Kyle
Kyle

Reputation: 67194

jQuery noob: change Display of one element when another is enabled

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.

Upvotes: 0

Views: 214

Answers (1)

jAndy
jAndy

Reputation: 236002

First line in your example must look like:

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

missed a parenthesis and a dot.

Upvotes: 3

Related Questions