Sunday, 1 September 2013

how to get top li from top of ul with jQuery pixel

how to get top li from top of ul with jQuery pixel

guys I have one ul that this ul has 5 li. this lies has these styles :
position: relative;
height: 50px;
width: 193px;
left: 0;
right: 0;
margin: 10px 0;
cursor: pointer;
and ul has these styles:
width: 200px;
height: 100%;
padding: 0;
margin: 0;
overflow-y: auto;
overflow-x: hidden;
list-style: none;
margin-left: 3px;
I want get top for any lies from top ul but when to use this code:
$('ul li').each(function(){
console.log($(this).css('top'));
});
show me this : 'auto' why??? I want to get pixel value

No comments:

Post a Comment