开发者

Show some elements from jquery collection of elements

¡Holla pros,

I have this piece of code, which is partially working. Based 开发者_StackOverflow社区on some conditions I want to make visible some of the list elements. Currently only the alert works. I`m not sure what is the error.


You're using attr wrong; it's meant to change an attribute of some html element. I was able to get this working by just changing attr to css, which is the correct way to update css; link to working fiddle here. You could also consider using classes combined with toggle, which can make your code easier to manage.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜