Wednesday, 7 August 2013

jQuery-showLoading plugin , offset() is null

jQuery-showLoading plugin , offset() is null

i'm just copying some code from a web page (it should be easy) but there
are some issues now and i don't know if they are connected to the css.
However the showloading plugin of jQuery doesn't work and it stops the
whole script from working. i get this error: TypeError:
jQuery(...).offset(...) is null
It's taking the element which i applied showloading to and it cannot get
the offset of it.Code:
var dialog = $("#response");
dialog.fadeIn(500);
dialog.showLoading(500);
I tried setting the styles for the element but the error is still showing up:
<div id="#response" style="postition: absolute; top: 150px; left: 50px;">
<div id="Canvas"></div>
<div id="#adx-img"></div>
<div id="#adx-body"></div>
<div id="#adx-ads"></div>
<div id="#adx-cat"></div>
<div id ="adx-flg"></div>
</div>
When i try ti inspect "jQuery(this)" from firebug it reports it as the
whole window, not only the element i passed as an argument to the function
showLoading. So i'm a bit confused. I don't think i should change
something in jQuery.showLoading plugin, maybe the code in my page is not
clear. Anyone has any hint? Agnese

No comments:

Post a Comment