Jump to content

UL List Item - Setting offsetTop


glenelkins

Recommended Posts

Hi

 

I can get the offsetTop value of an unordered list like so:

 

var LI_Items = document.getElementsByTagName ( "li" );

for ( var i = 0; i < LI_Items.length; i++ ) {

   var this_offsetTop = LI_Items[i].offsetTop;

}

 

but how do i set the offsetTop ?? If i try  LI_Items.offsetTop = 10  its produces an error

 

 

Link to comment
https://forums.phpfreaks.com/topic/90901-ul-list-item-setting-offsettop/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.