I have a clickable button on the bottom. As soon as I click on the button, it opens an overlay but the page jumps to TOP.(I mean to say, Page goes to top- the same way as when it loads). I want to avoid this behaviour and page should be centered at the bottom only rather than jumping to the TOP when my overlay div appears.
My Code is
onclick="showOverLay();"
function showOverLay()
{
$('.overlayBarcode').fadeIn('normal');
return false;
}
div.overlayBarcode {
background: url("/DiscoverCenter/images/white.png") no-repeat ;
_background: url("/DiscoverCenter/images/white.png") no-repeat ;
display: none;
margin: auto;
padding: 40px;
width: 576px;
z-index: 10000;
}
Please let me know, how to solve this problem.I am trying this since a long.
Thanks
Is it a link? With a hash mark for the href? If so, that’s the culprit.