[Javascript] jQuery: toggle() method not working

Andre Polykanine andre at oire.org
Tue Nov 16 09:27:03 CST 2010


Hi everyone,

What I'd like to do is show or hide the social bookmarks links after a
click on the "Show/hide" link.
Here's my code:

<script type="text/javascript">
$("#showBookmark").click(function(e) {
$("#bookmark").toggle();
e.preventDefault();
});
</script>
<a href="#" class="menu" id="showBookmark">Show/hide social bookmarks</a>
<div id="bookmark" class="main" style="display:none"><?=$knopka?></div>

That doesn't work. What am I doing wrong?
Thanks!

-- 
With best regards from Ukraine,
Andre
Skype: Francophile
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion



More information about the Javascript mailing list