In my code jQuery code (I know the if statement isn't jQuery), the css property "right" for the class "slider" does NOT equal 30, yet "container" is still fading out on mousedown.. What am I doing wrong? I want it to be: if the class of slider has a "right" css property equal to 30px, then fadeout the container.
$(document).ready(function() {
$(".slider").mousedown(function() {
if ($('.slider')
.css({'right':30})
) {
$('.container')
.fadeOut('slow');
}
});
});