I have a link on webpage. When I click this link a pop is appeared using CSS.
For example:
<a href="/popup/show.php?marLft=950&marTo开发者_如何学Pythonp=400" id="MyId" class="MyClass">Show Popup</a>
I use marLft
and marTop
to set a css margins and Popup is shown on correct location under link.
Problem:
Now problem is that now I have some DIVs on webpage that are using jQuery fadeIn and fadeOut functionality. So location of Show Popup
link is not same all the time and popup is not shown under the link always. How can I get location of link and pass that location in form of top and left margins to the linked script at runtime.
How it is possible.
Thanks
http://api.jquery.com/offset/
I think it you will help you.
精彩评论