javascript - Any tricks to finding a lost jQuery object? -


I'm working with jQuery.validate, one of its options is "success" where a function is on a valid provider Can be asked for admission. The only logic that can be passed is "label" (as I think) on the right side of the input element there is a dynamically linked label field.

I need to have a series of a series on a brother "div", but I want to try to get the device that I want. I do not know where the label is.

I have used such things as alert (label ('. Formula'). Html ()); and Warning (label). (). mother-father (). mother-father (). Html ()); and they all return "null" ... alert (label.html ()); Returns ""

Similar methods have worked for me in the past. Once when I find something, I'll go to next () or find () and all are ok. Is there any other way?

PS Example Code:

  Success: Function (label) {errorspotholder = label.parents ('formula'). (Find 'Rederrorx'); Errorspotholder.removeClass ('rederrorx') addClass ('norederrorx') qtip ('deleted') .. },  

This question is a little case-specific and therefore perhaps it is not very useful Anyone else ...

But what I have done instead of using "labels" was to declare a global variable on the basis of another dynamic selector from jQuery valid (in this case I used "element" from jQuery.validate "errorPlacement").

This worked

Marco has also suggested suggestions for finding lost elements by looking at the code generated from the firebug (getfirebug.com) console. great thought! I did not find my lost label, but it was supposed to work and probably would work for someone else.


Comments