![]() |
Need some quick jQuery help
Trying to code up a page to hide content on load, but expand once the header is clicked.
First header works, but the second and third are not at the moment. I need probably 15 different headers here. I'm no jQuery expert by far. http://barcritic.com/toggle3.html Anyone see what I'm doing wrong here? :helpme Code:
$(document).ready(function(){ Code:
<h4 id="expanderHead"> |
I am not a jquery expert but I think your problem is because of duplicate ids. I do believe that ids need to be unique.
Just a quick guess. . |
Quote:
Here's the other one. Code:
jQuery(document).ready(function() { |
Quote:
I have not used jquery much though so I am not sure of the best way to do it there. Doing it with just javascript on the onclick is fairly easy. . |
Hmm...going to try this http://jsfiddle.net/sYwER/5/
Just might work for what I need. Edit: Nope, unordered and ordered lists are not hidden. :( |
Quote:
Script: Code:
$(document).ready(function(){ Code:
<div class=head> |
Awesome!!! Thanks, sarettah!
|
All times are GMT -7. The time now is 06:11 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123