Is there a way to write an if else statement that triggers one class when another one is clicked, but only under the condition that the first class has a marginTop of -200px?
I attempted to use this if statement, but it doesn't seem to be working as expected:
if ($('.logintrigger').click() && $('.register').css('marginTop') === '-200px') {
$('.registertrigger').toggle(
function () {$('.register').stop().animate({'marginTop':'-0px'},200); $('#opencloseregister').css({'backgroundPosition':'-20px 0px'});}
);
}
Do you have any suggestions or alternate solutions for this issue???