This applies to jQuery 1.3 and jQuery Form Plug 2.25.
I hope this will be a walk even for an amateur, but I do not know.
var x; $('div#response').fadeOut(300,function() { // do something x = this; } $('#myForm').ajaxForm({ target: x, success: function() { // do something } });
What I would like to do is define the target value as a variable that I previously defined; we will say that it is an "x". This is shown in the example above, but the string "target: x" certainly fails. How can i do this?
Also: I know that x = div # is the answer in this example, but in the real problem I'm working on, I don't have a clear definition of x. I know that in this example I could just change "target: x" to "target: div # response" and it will work, but this example is just for argument. I need a goal equal to x. How to do it?
source share