1

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!

3
  • most probably you have incorrect selector, are you sure that here is element like <input type="text" id='MyInput' > ? Commented Nov 1, 2012 at 3:36
  • the error says nodeType is null or this by defining and my input text is this: @Html.TextBoxFor(m => m.Table1.Id, new { @readonly = "readonly", id = "MyInput" }) . in html is <input id="MyInput" name="table.Id" readonly="readonly" type="text" value="3" /> Commented Nov 1, 2012 at 3:44
  • refer this as well stackoverflow.com/questions/3022686/… Commented Nov 1, 2012 at 4:17

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.