Possible Duplicate:
Disable button if margin-left = -3200
I have a page that when it loads, there is a div that is margin-left:0px; on the click of a button, this element moves left in 600 pixel increments. Somehow I want to try and listen to when the element is -3200 pixels from the left only I cant seem to figure it out.
Can anybody see where im going wrong?
$(".hero-carousel").on("click", function(event){
if($(this).css("margin-left") == -4480) {
alert('test');
} else {};
});
Try this…