jquery工具提示从下拉列表中选择显示全文 [英] jquery tooltip to display full text from dropdown selected value
本文介绍了jquery工具提示从下拉列表中选择显示全文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何实现以下目标:
http ://easylistbox.com/demoDropDownToolTip.html
使用jquery工具提示?我可以举个例子
with jquery tooltip? can I have an example please
推荐答案
假设您使用的工具提示插件这里,以下代码应该符合您的要求:
Assuming you are using the tooltip plugin provided here, the following code should do what you require:
$(function() {
$('#test').tooltip({
bodyHandler: function(){
return $(this).find("option:selected").text();
}
});
});
当然, test
将是您的的id属性选择
。看看小提琴这里。
Where of course, test
would be the id attribute of your select
. Look at the fiddle here.
这篇关于jquery工具提示从下拉列表中选择显示全文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文