Try following ways:
// 'this' won't point to the element when it's inside the ajax closures,
// so we reference it using a variable.
var element = this;
// get the id
alert("element.id: " + element.id);
// different ways of getting the tag type.
alert("element.nodeName: " + element.nodeName);
alert("element.tagName: " + element.tagName);
alert("element.tagName: " + $("#" + element.id).get(0).tagName);
//The following will return true if the element is an input:
alert("element.tagName: " + $("#" + element.id).is("input"));
Sunday, December 12, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment