rifts Posted March 12, 2010 Posted March 12, 2010 hey everyone i have a javascript code which makes a word toggle links under it for example before clicking on it it looks like this: Stories: then once its clicked on it looks like: Stories: story 1 story 2 story 3 how can i make it so when you click stories it creats that list and also goes to story 1 here is the code i have <h2 style="margin-left : 25px;"><img src="/images/sort_ASC.gif" id="img_DegreeList5" alt="" /><a href="javascript:toggleDegreeList(5);" style="color:#336699;">Teaching Tales</a></a></h2> <div id="DegreeList5" style="display:none;"> <ul><ul> <li><a href="teaching_tales1.php">Story 1</a></li> <li><a href="teaching_tales2.php">Story 2</a></li> </ul></ul> </div>
jvanegmond Posted March 12, 2010 Posted March 12, 2010 Apart from two ul elements, your HTML looks fine. Better probably is use onclick on a element and href to #. What's your javascript code? github.com/jvanegmond
rifts Posted March 12, 2010 Author Posted March 12, 2010 i figured out a way to do it thanks for looking
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now