I'm designing a site. It's not very good, I know, because I'm not very good at this stuff.
http://telecasters.msu.edu/goodlook/
Anyway, I'm having trouble with a Javascript/CSS combo. If you go to the link above, there's a box on the side labeled "Where to Watch." What I'd like is for the list of channel to start out collapsed, so that it looks like this. Then clicking on the individual channels should roll out the days and times for that channel, so that when all the channels are expanded, it will look like this. (I'll style that list better later. heh).
But when you go to the site, you'll see it doesn't behave that way at all. The "slide in" and "slide out" effects work (I wrote a little toggle function), but something about my CSS is bad.
Related Files:
http://telecasters.msu.edu/goodlook/
http://telecasters.msu.edu/stylesheets/sidebar.css
http://telecasters.msu.edu/javascript/sidebar.js
Also a little side-question: For links that trigger JavaScript events, I usually use <a href="#" onclick="event()">. I've noticed a lot of sites do that. But something about linking to a blank anchor like that causes my pages to jump back up to the top, as if the top is an anchor or something. Other sites don't do that. What am I doing wrong there?
http://telecasters.msu.edu/goodlook/
Anyway, I'm having trouble with a Javascript/CSS combo. If you go to the link above, there's a box on the side labeled "Where to Watch." What I'd like is for the list of channel to start out collapsed, so that it looks like this. Then clicking on the individual channels should roll out the days and times for that channel, so that when all the channels are expanded, it will look like this. (I'll style that list better later. heh).
But when you go to the site, you'll see it doesn't behave that way at all. The "slide in" and "slide out" effects work (I wrote a little toggle function), but something about my CSS is bad.
Related Files:
http://telecasters.msu.edu/goodlook/
http://telecasters.msu.edu/stylesheets/sidebar.css
http://telecasters.msu.edu/javascript/sidebar.js
Also a little side-question: For links that trigger JavaScript events, I usually use <a href="#" onclick="event()">. I've noticed a lot of sites do that. But something about linking to a blank anchor like that causes my pages to jump back up to the top, as if the top is an anchor or something. Other sites don't do that. What am I doing wrong there?