asp.net mvc 3 - I have a checkbox and an information icon.If checkbox is checked ,than i have to show some message on the tooltip of that information icon -
i have checkbox , information icon.if checkbox checked ,than have show message on tooltip of information icon.and if checkbox unchecked have show different message on tooltip of information icon.
try this:
html code:
<input type=”checkbox” name=”chkinput” id=”chkinput” value=”show information” />show information <img id=”imginformation” src=”info.jpg” alt=”information” height=”50” width="50" tooltip=”information checkbox unchecked”>
jquery code:
$(“#chkinput”).change(function(){ if(this.checked){ $(“#imginformation").tooltip({ content: “information checkbox checked” }); } else{ $(“#imginformation").tooltip({ content: “information checkbox unchecked” }); } });
see working fiddle setting tooltip using jquery http://jsfiddle.net/soyuka/vvvwd/. jquery 1.9.1 , jqueryui 1.9.2 included.
Comments
Post a Comment