Created
October 15, 2019 08:16
-
-
Save RuslanHolovko/0e1a681b6ba306fb7ca52c53fd38e171 to your computer and use it in GitHub Desktop.
Slide toggle, check if slide is open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on('click', '.mobile_phones-box', function() { | |
$('.phone').slideToggle(400, function (){ | |
if ($(this).is(':hidden')) { | |
console.log("closed"); | |
} else { | |
$('body, html').animate({ scrollTop: 0 }, 300); | |
console.log("open"); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment