I can't get the jquery ui tooltip to show for a checkbox...am I doing something wrong or is this not possible?
<input name="item.AutoOpen" class="check-box" id="item_AutoOpen" type="checkbox" CHECKED="checked" data-val-required="The Auto Open field is required." data-val="true" value="true"/>
<button class='m-btn blue' title="test" style='width: 200px;margin:4px;'>hello</button>
<script type="text/javascript">
$(function () {
$("*").tooltip({ content: "Awesome title!" });
});
</script>
Works for the button but not the checkbox.
/
EDIT: wasn't working because of the lack of a title (which I had avoided adding because you cant add a title easily using EditorFor in ASP.Net MVC)...
Solution:
$(':checked').attr('title', 'Auto Load').tooltip();
I can't get the jquery ui tooltip to show for a checkbox...am I doing something wrong or is this not possible?
<input name="item.AutoOpen" class="check-box" id="item_AutoOpen" type="checkbox" CHECKED="checked" data-val-required="The Auto Open field is required." data-val="true" value="true"/>
<button class='m-btn blue' title="test" style='width: 200px;margin:4px;'>hello</button>
<script type="text/javascript">
$(function () {
$("*").tooltip({ content: "Awesome title!" });
});
</script>
Works for the button but not the checkbox.
http://jsfiddle/XseWc/123/
EDIT: wasn't working because of the lack of a title (which I had avoided adding because you cant add a title easily using EditorFor in ASP.Net MVC)...
Solution:
$(':checked').attr('title', 'Auto Load').tooltip();
Share
Improve this question
edited Dec 4, 2012 at 11:25
woggles
asked Dec 4, 2012 at 11:05
woggleswoggles
7,46413 gold badges77 silver badges132 bronze badges
1 Answer
Reset to default 9Add title attribute to the checkbox