I need to check if an elements left positioning is equal to 0px but am unsure how to go about it.
So far I have:
if($('#slide-panel').attr(left) == '0px'){
//do something
};
But I am not sure of how to make the syntax work.
Any advice would be appreciated! Thanks
Use .position method:
The position is relative to the offset parent, if you want to relative to the document, then use
.offset()method.