Quantcast
Channel: Topic Tag: contact-form | WordPress.org
Viewing all articles
Browse latest Browse all 5993

bcworkz on "JS error UndefinedID in function preventing content loading"

$
0
0

.attr('id') doesn't work if there is no ID attribute. Try using the DOM references this.id.length and this.name.length directly in the conditional like so:
if (this.id.length == 0 && this.name.length != 0) {
and get rid of the assignments to var id and var name.

Note that $j(this).id.length does not work because .id is not a jQuery property, it is a DOM property.


Viewing all articles
Browse latest Browse all 5993

Trending Articles