开发者

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

开发者 https://www.devze.com 2023-01-02 03:48 出处:网络
I made an attempt at changing the CSS of an element display: block; when another div开发者_Go百科 is enabled..

I made an attempt at changing the CSS of an element display: block; when another div开发者_Go百科 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.


First line in your example must look like:

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

missed a parenthesis and a dot.

0

精彩评论

暂无评论...
验证码 换一张
取 消