开发者

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开发者_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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜