tags:

views:

27

answers:

1

I made an attempt at changing the CSS of an element display: block; when another div is enabled..

Here is a jsFiddle example.

What am I doing wrong?

Website example: click FILTER MENY and select one of the filters. When the div "DU SØKER" is enabled, Filter Meny should stay open, when Du Søker is not enanbled (remove your filter choice) it should return to what it was doing previously.

+3  A: 

First line in your example must look like:

if($('.box.expandResults')) {

missed a parenthesis and a dot.

jAndy
Thanks, it works when the div is ensbled, but when I disable it again, it still remains..
Kyle Sevenoaks
How can I tell the else to just return to what it was originally?
Kyle Sevenoaks
see `http://jsfiddle.net/GKvmz/12/`
jAndy
Thanks. But now it's broken my show hide pin function.. :/
Kyle Sevenoaks
Ops, I messed up abit of markup, thanks! Works fine :)
Kyle Sevenoaks