var currentLeft = $(this).css('left');
if((currentLeft%2)== 0){ thisLeft = currentLeft; }
I want to set the variable thisLeft = currentLeft only if the left attribute of the clicked item is divisible by 0.
The problem is that css(‘left’) selects ‘400px’, but im only interested in the 400 part.
How can i do this?
1 Answer