Yeah, it's certainly open to interpretation.  As currently implemented
it mimics the jQuery load method and so the behavior is the same for
something like this:

$('myTargets').load('myUrl', function() { alert('ok'); });

In the above you would get an alert for every matching target.  But to
me that doesn't make sense, mostly because it is inconsistent with
$.get, $.post and $.ajax.  "load" has an extra bit of nastiness to
accommodate embedded scripts in the response but I think it's a bug to
fire the success handler for each element (and documentation does not
defined that behavior).

Mike



To me, it would seem to make some sense that the "success" would run for
each target. However, it should receive a pointer to the current target.

$(document).ready(function() {
        $('form#object').ajaxForm({
                target: '#oblist , #oblistt',
                success: function(current) {
                        $(current).fadeIn('slow');
                }
        });
});

So basically the success callback would be triggered for each target, with a
pointer to this being passed as an argument. Essentially it would run like
the each() method.

I guess you could make an argument doing it either way...

-Dan



Reply via email to