d-_-b d-_-b - 1 year ago 79
jQuery Question

$(this).parent with class name of 'x'

In jquery, how can I reference the parent of

element with a
of 'abc'?

Answer Source

Like this:






.parent() and .parents() are similar except that .parent() only travels up one level in the DOM tree.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download