Get offset : offset « jQuery « JavaScript DHTML






Get offset

 <html> <head> <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ var b = $("b:last"); var offset = b.offset(); alert(offset.left); alert(offset.top); }); </script> </head> <body> <body> <b>Hello asdf asdf</b> </body> </html> 








Related examples in the same category

1.Get top
2.Output tag and coordinates
3.offset(): returned object contains two Integer properties, top and left. (works only with visible elements)
close