Animate / function before go to the next page on link click - Jquery
<script>
$(".mlink").click(function (e) {
e.preventDefault();
var link = $(this).attr('href');
$('body').addClass('animated hinge').delay(3000).queue(function(){
//.delay(3000).queue - to delay next function
location.href = link;
});
});
</script>
or
<script>
$("#info-text-container").click(function(){
setTimeout(function(){
$("#info-text").addClass("info-text-active");
}, 500);
});
</script>
<script>
$(".mlink").click(function (e) {
e.preventDefault();
var link = $(this).attr('href');
$('body').addClass('animated hinge').delay(3000).queue(function(){
//.delay(3000).queue - to delay next function
location.href = link;
});
});
</script>
or
<script>
$("#info-text-container").click(function(){
setTimeout(function(){
$("#info-text").addClass("info-text-active");
}, 500);
});
</script>
No comments:
Post a Comment