hyperlink. If you clicked on it, it will bring you to the top of your page. The reason
of this behavior is because of the # symbol. To solve this problem, we need to cancel the default
behavior by doing this:
$('#close').click(function(e){
e.preventDefault();
});
OR
$('#close').click(function(){
return false;
});
<a href="#" id="close"></a>
No comments:
Post a Comment