Log In · Register

 
 
Closed TopicStart new topic
Care to explain?, jQuery help
Mikeplyts
post May 7 2010, 10:03 PM
Post #1


Mel Blanc was allergic to carrots.
*******

Group: Official Designer
Posts: 6,371
Joined: Aug 2008
Member No: 676,291



I'm designing a blog layout, and I want to toggle some content. I'm trying to use something pretty simple and I came up with this:
CODE
$(function() {
    $("a#show").click(function(event) {
        event.preventDefault();
        $("div#content").slideToggle();
    });
});

Yes, I am using jQuery (in case you didn't read the sub-title). Help?


EDIT:
Never mind. Fixed it.
CODE
$(function() {
    $('a#show').click(function() {
        #('div#content').slideToggle();
    });
});

pinch.gif
 
Mickey
post May 8 2010, 08:39 AM
Post #2


Treasure Pleasure
********

Group: Head Staff
Posts: 11,193
Joined: Oct 2005
Member No: 281,127



Topic closed & moved.
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: