I have a dynamic form that I wrote in rails. I want to be sure that the user can add no more than five links.
I start with two links, and I have another link that allows the user to add another field. I also have a link next to the links, which allows the user to remove the field that sets the hidden field, and then hide the field using the slideUp (); function.
I want to know if there are 5 fields on the screen that the user hopes to present.
Here is what I'm using right now - it's just counting all divs with that class name.
if($(".classname").length <5){
}
I want to check if "style =" display is displayed: none; "" How can i do this?
source
share