user1592953
user1592953

Reputation: 135

Toggling a div with jquery

I would like for the div #share-sub-bottom to be toggled between shown and hidden when the user clicks the add photo link. For some reason, I cannot get it to work, what could I be doing wrong?

Jsfiddle Demo http://jsfiddle.net/Jzp5H/1/

Upvotes: 0

Views: 74

Answers (4)

Rohit Azad Malik
Rohit Azad Malik

Reputation: 32162

Hi now demo http://jsfiddle.net/Jzp5H/8/

<a href="#" class=".show_hide"> Add Photo </a>

into this

<a href="#" class="show_hide"> Add Photo </a>

Do not use a dot in front class=".show_hide" used simply class="show_hide"

Upvotes: 1

cola
cola

Reputation: 12466

Change in your html file for this line:

<a href="#" class=".show_hide"> Add Photo </a>

To this:

<a href="#" class="show_hide"> Add Photo </a>

Don't use dot(.) in front.

Upvotes: 1

Tom
Tom

Reputation: 3040

remove the dot from your class definition, and it works like charm

this you have

<p> <a href="#" class=".show_hide"> Add Photo </a> </p>

this you should have

<p> <a href="#" class="show_hide"> Add Photo </a> </p>

Upvotes: 1

Mihai Matei
Mihai Matei

Reputation: 24276

Check out this jsfiddle . You gave to Add photo link the class class=".show_hide" and this is not correct. You should gave it show_hide

Upvotes: 1

Related Questions