Reputation: 7444
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.net/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();
Upvotes: 1
Views: 7121