$('#my_form').submit( function (e, data){
if (data == 'silent') return true;
e.preventDefault();
...
if (valid) {
$('#my_form').trigger('submit', 'silent');
}
});
var data = {};
var values = $('#parent .value');
data.MMR = values[0].html();
data.matches = values[1].html();
data.wins = values[2].html();
data.MMR = $("div:contains('MMR:') .value").html();
for (var i in onload_js) {
if (onload_js.hasOwnProperty(i)) { /* do something */}
}
This is a shorthand Ajax function, which is equivalent to:
$.ajax({
url: url,
dataType: 'script',
success: success
});
This object will be made the context of all Ajax-related callbacks
for (var i in onload_js) {
for (var j in onload_js[i]["src"]) {
$.ajax(
url: onload_js[i]["src"][j],
dataType: 'script',
context: onload_js[i],
success: function() {
if (//Здесь проверка что все остальные скрипты загружены тоже)
this["callback"]();
}
);
}
}