mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
removed $.fn.changer by Marc's request and changed back the responseText in $.xml
This commit is contained in:
parent
6656522705
commit
50cdc997b8
23
ajax/ajax.js
23
ajax/ajax.js
@ -120,18 +120,15 @@ $.fn.load = function(a,o,f) {
|
||||
t = "POST";
|
||||
}
|
||||
var self = this;
|
||||
$.xml(t,a,o,function(h){
|
||||
// Get HTTP data
|
||||
h = $.httpData(h);
|
||||
|
||||
$.xml(t,a,o,function(res){
|
||||
// Assign it and execute all scripts
|
||||
self.html(h).find("script").each(function(){
|
||||
self.html(res.responseText).find("script").each(function(){
|
||||
try { $.execute( this.text || this.textContent || this.innerHTML || ""); } catch(e){}
|
||||
});
|
||||
|
||||
// Callback function
|
||||
if (f && f.constructor == Function)
|
||||
f(h);
|
||||
f(res.responseText);
|
||||
});
|
||||
return this;
|
||||
};
|
||||
@ -324,17 +321,3 @@ $.fn.putForm = function(target, pre_cb, post_cb, url, mth) {
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------
|
||||
|
||||
$.fn.changer = function(form, target, pre_cb, post_cb) {
|
||||
$(form).submit(function(e) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
this.change(function(e) {
|
||||
e.preventDefault();
|
||||
$(form).getForm().putForm(target, pre_cb, post_cb);
|
||||
return this;
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user