Basically what I’m trying to accomplish is I want to check multiple dynamic forms on a page. Then if All textareas are empty OR have the default value, perform a function. Otherwise if any of them are not empty without the default value, cancel the function.
I know how to get the total count of the divs/forms or go through each one, sorta. Just can’t put it together. I want it to check them all first before doing anything.
if (jQuery("div[id^='statuscontainer_']:last").length == 0){
}
I don’t think this would get quite what I need to do. Or either I not sure how to form it into the function I need.
Thanks
You could take this approach
inputBoxCreate a script to add the total of each
inputBoxlength. If that total == 0, take whatever approach, otherwise continue with the scriptTry it
http://jsfiddle.net/kLnHC/
Edit
Though, in your application, you’d probably want to change the event that triggers it to
$('#yourForm').submit(function() {rather than a click function.