Title: JavaScript   CSS = I need a little help.
Last modified: August 18, 2016

---

# JavaScript CSS = I need a little help.

 *  [armageddondesign](https://wordpress.org/support/users/armageddondesign/)
 * (@armageddondesign)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/javascript-css-i-need-a-little-help/)
 * Allllllllrighty. I’ve been working on building a togglable sidebar using javascript
   and css. I’ve got everything working except for one little thing:
 * When you click on the tab to toggle the sidebar to be shown (the sidebar starts
   hidden), the tab image is supposed to change…which it does. The problem is, when
   you click the tab to hide the sidebar again, the tab image is supposed to change
   back to the original image…which it’s *not* doing…and I can’t figure out why.
 * Anyone want to take a look at the script (all is included in the page) and give
   me any ideas as to why the image won’t change back?
 * [http://www.armageddondesign.net/jstester/index.html](http://www.armageddondesign.net/jstester/index.html)
 * BTW, feel free to use the code to create your own togglable sidebar. 🙂
 * Any help appreciated and thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [drobbins](https://wordpress.org/support/users/drobbins/)
 * (@drobbins)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/javascript-css-i-need-a-little-help/#post-270421)
 * Try this – look at the beginning of the script – change tab.src==”hide.gif” to
   tab.src=”hide.gif”
 *  Thread Starter [armageddondesign](https://wordpress.org/support/users/armageddondesign/)
 * (@armageddondesign)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/javascript-css-i-need-a-little-help/#post-270460)
 * Nope. That breaks that whole script and the tab never does it’s initial change.
   It needs the == there.
 * Anyone else? I really need to get this figured out so I can launch this new blog.
 *  [drobbins](https://wordpress.org/support/users/drobbins/)
 * (@drobbins)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/javascript-css-i-need-a-little-help/#post-270486)
 * hrm – well, I tried going to your link again, it didn’t work at first, but then
   I navigated to [http://www.armageddondesign.net/jstester/hide.gif](http://www.armageddondesign.net/jstester/hide.gif),
   because the image wasn’t showing up; I saw the image finally, went back to the
   original address you posted, and suddenly I see the image and it is working (
   showing/hiding)? Weird.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘JavaScript CSS = I need a little help.’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [swap](https://wordpress.org/support/topic-tag/swap/)
 * [toggle](https://wordpress.org/support/topic-tag/toggle/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 3 replies
 * 2 participants
 * Last reply from: [drobbins](https://wordpress.org/support/users/drobbins/)
 * Last activity: [20 years, 7 months ago](https://wordpress.org/support/topic/javascript-css-i-need-a-little-help/#post-270486)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
