I'm trying to implement a tooltip with varied content but simply not displayed. and get an error on this line in the js jQuery:
if ( targetElem.nodeType === 9 ) { targetWidth = target.width(); targetHeight = target.height(); basePosition = { top: 0, left: 0 }; // TODO: use $.isWindow() in 1.9 } My code is this:
<script type="text/javascript"> $(document).ready(function () { $("#MyInput").tooltip({ content: function (response) { return "Hi"; }, open: function () { $(this).tooltip("widget").stop(false, true).hide().slideDown("fast"); }, close: function () { $(this).tooltip("widget").stop(false, true).show().slideUp("fast"); } }).tooltip("widget").addClass("ui-state-highlight"); }); </script> Input
@Html.TextBoxFor(m => m.Table1.Id, new { @readonly = "readonly", id = "MyInput" }) what is wrong with the code?
update
something is wrong with the jQuery UI plugin, better switch to another plugin "QTIP" and this worked well.
thanks!
<input type="text" id='MyInput' >?