1

I have a select box and when selects an option it should display the tooltip correctly and it should be at the right of the select box , how to position like this ,and its now overlapping the tooltips ,how to avoid this and display one by one ? 谢谢 。
网页:

<div class="form_block2" >
    Plan<SPAN style="color:#ff0000;">*</SPAN>:<br/>
    <select class="input_txt_block1" title="Select one" id="plan" name="plan">
        <option selected="selected"> ------- Select PLan ------- </option>
        <option title="three dynamic pages" value="1">Gold</option>
        <option title="two dynamic pages" value="2">Silver</option>
        <option title="one dynamic pages" value="3">Bronze</option>                               
        <option title="single page website" value="5">Basic</option> 
        <option title="Basic information" value="4">Listing</option>
    </select><span style="color:blue;" id="message"></span>
</div> 

查询:

$("#plan option").tooltip({
    position: {
        my: 500,
        at: 500
    }
});

编辑:当我删除位置属性时,它会一一出现,但定位不正确。

这是小提琴:FIDDLE

4

2 回答 2

5

好的,我这样做了:

$(document,"#plan option").tooltip({position: {
                        my: "center",
                        at: "right+200",
                        track: false,
                        using: function(position, feedback) {
                            $(this).css(position);                   
                        }
                    }
                });

这是小提琴

于 2013-07-08T11:18:04.373 回答
0

我做了一些修改,在我的情况下,我想在悬停元素的右上方显示工具提示,即使页面被滚动并且它没有空间来显示工具提示(我们强制在特定位置显示工具提示以悬停元素) .

        position: {
        my: 'left bottom-40',
        at: 'right',
        using: function(position, feedback) {
            console.log(feedback);
            position.top = feedback.target.top - (feedback.element.height);
            position.left = feedback.target.left + feedback.target.width;
            $(this).css(position);                   
        }
    },
于 2018-03-20T12:44:24.647 回答