Hi there, I need help with the following code snippet:
function getLocation() {
var positionLeft = $('#element').position().left;
var positionTop = $('#element').position().top;
}
I also have this line of code:
$('ul#container>li.node:eq('+YYY+')').css({'border' : '5px solid yellow'});
Can someone assist me in figuring out how to determine the index of the LI element that corresponds to the coordinates provided by the getLocation()
function?
Please note that YYY marks the section where I need to insert the index of the LI elements.