I want to check wether a button is pressed in jQuery. If the button is pressed the page has to scroll down. If the button it not pressed the page shows an animation and once this is finished it has to scroll down.
Now I have this:
$('#btmmdl').click(function(){
$(this).data('clicked', true);
});
if($('#btmmdl').data('clicked')){
// Scroll down
} else {
// Show animation and scroll down after 9 seconds
}
Am I doing something wrong?