I'm using toggle script but every time I click on the script link it does toggle but it also jump to page top! Any ideas? Here is the code:
<a href="" id="button2">Read More…<a>
<div id="hidden_content2" style="display:none;">
<p>bla bla</p>
</style>
</div>
<script>
$(document).ready(function() {
$("#button2").toggle(
function() {
$(this).text('Hide Content…');
},
function() {
$(this).text('Read More…');
}
).click(
function() {
$("#hidden_content2").slideToggle("slow"…
}
);
});
</script>