1

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();       

1 Answer 1

9

Add title attribute to the checkbox

Sign up to request clarification or add additional context in comments.

1 Comment

thanks that does it...was trying to avoid doing that because of the limitation with EditorFor in ASP.NET MVC - ill try add the title using jquery before the call to tooltip.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.