Posts: 876
Name: Matt Pealing
Location: England, north west
|
I've coded a very basic script to display any form that contains a specific child element, like so:
Code:
// keep the contact form open if any error messages are present
$(document).ready(function() {
$('#content .gform_wrapper').each(function() {
if($(this).find('.validation_error')) {
$(this).show();
}
});
// location.href = location.href+'#gform_7';
});
But it just displays every form even if it doesn't contain '.validation_error' ! Does anybody know why? Is the find() method not valid to use in this way?
|