Jump to content

linuxinit

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

linuxinit's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Okay I've been screwing this this for the last 5 hours. I give up. I haven't had to ask for help on something like this in years. It's actually kind of depressing. Javascript really isn't my thing. Anyways... Here's the layout I'm working on: [a href=\"http://linuxinit.net/site/temp/new_layout/\" target=\"_blank\"]http://linuxinit.net/site/temp/new_layout/[/a] Right now... I'm trying to get the recent comments working the way I see it in my head: When you click on one of the comment authors, the rest of the comment should slide out. While you are hovered, it should have a similar background as the top of the page. The problem is, when you move the mouse off of the span it goes away. What I want it do do is, when you click on a span inside #sidebar it is set to the css class ".toggled", and any other spans that are set to toggled would be set to ".untoggled". I'd prefer a way to do this without putting tons onclicks in each span to unset the others, so that it's cleaner. I really don't like javascript, and usually do as much with css as possible, but this requires javascript, which I'm not proficient in. In psuedo-code it would go something like: [code]onclick setClass='toggled' && setotherClass='untoggled';[/code] I honestly have no idea how to do it with JS. If the moo.fx script can let you click on one item, then another, and have the previous one reset, I figure it shouldn't be too complex to just add on to it somehow. I figured I could just add a function to one of the libraries that I'm already including that would get the job done without having to modify the html source. Again real quick if you skimmed: 1. Click span. 2. Set span class to toggled. 3. Set other span's class to untoggled. I'd like to be able to click the same span twice to toggle it on and off if possible, but it's not really required. Any help is greatly appreciated. Here's the link again if you skimmed: [a href=\"http://linuxinit.net/site/temp/new_layout/\" target=\"_blank\"]http://linuxinit.net/site/temp/new_layout/[/a] I have no problem linking back to anyone that helps. :) Thanks in advance, Gordon
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.