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.
精彩评论