rguliev / conditionize2.js

jQuery plugin for conditioning things
https://rguliev.github.io/conditionize2.js/demo/index.html
MIT License
22 stars 6 forks source link

Fields only get hidden after jQuery document.ready is triggered. Suggestion: CSS support for hiding fields by default, and have the JS overwrite the CSS. #6

Closed oalexdoda closed 1 year ago

rguliev commented 5 years ago

Hi, Waiting for document.ready was made on purpose. Without it, if a form has predefined values, all conditions will be calculated incorrectly because calculation might start before the value is assigned. You have a point too. I guess adding a parameter like hideFirst: true solves the problem. On the other hand, one can just set CSS manually like .conditional {display:none;}. Which is also quite simple. I will think about it. If this is demanded by many other users, then I will definitely add the option. But as long as it is a one person's request, I think it's simpler to add CSS manually.