Ran into a little problem with jQuery.fn.position() when the element
that is applied is not visible. If i do:
var pos = $("#divHover").position();
alert(pos.left + " " + pos.top);
On an element that is not visible, jQuery blows up with an error like
this:
[Exception... "Could not convert JavaScript argument arg 0
[nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80570009
(NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame ::
http://localhost/jqueryWeb/scripts/jQuery.js :: anonymous :: line
878" data: no]
http://localhost/jqueryWeb/scripts/jQuery.js
Line 878
Apparently some of the computed styles are not available causing
jQuery to choke.
The fix is easy enough if you know what the problem is - make the
element visible first, but this is kind of a pain if used in generic
code.
While I'm at it here - why is .position() still not documented in the
1.2.6 docs? Is this function not officially supported by any chance?
+++ Rick ---
Rick Strahl
West Wind Technologies
www.west-wind.com/weblog
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---