Je ne comprends pas cette fonction
Bonjour à tous,
Je suis pas trop expert alors voilà, j'ai besoin de vos limières---
J'ai cette variable
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
var Manager = {
[...code...]
setPageSize: function (a) {
this.pageSize = a || 0;
this.sendRequest()
},
setPage: function (a) {
this.page = a;
this.sendRequest(true)
},
sendRequest: function (c) {
this.page = c ? this.page : 1;
var b = this.sent ? "ul#product_list" : "div#center_column";
var d = $jq(b).innerWidth();
var a = $jq(b).innerHeight();
var f = $jq(b).outerWidth() / 2 - 25;
var e = $jq(b).outerHeight() / 2 - 25;
$jq(b).css("position", "relative");
if ($jq(b + " #loadingMask").length == 0) {
$jq(b).append('<div id="loadingMask" style="position:absolute;top:0;left:0;opacity:.4;width:' + d + "px;height:" + a + 'px;background-color:#fff"></div><div style="position:absolute;top:' + e + "px;left:" + f + 'px"><img height="50px" src="' + baseDir + '/modules/filterproductsplus/loading.gif"/></div>')
}
if (this.request) {
this.request.abort()
}
this.request = $jq.post(this.getURI(), {
data: JSON.stringify(this.data)
}, function (g) {
$jq("div#center_column").html(g);
$jq(b).css("position", "")
});
this.sent = 1
}
}; |
Il y a ceci
qui fait appel à ceci
Code:
1 2
|
sendRequest: function (c) {} |
Je ne comprends pas comment ca peut fonctionner car il y a un 'c' alors que tous les this.sendRequest() n'en ont pas. Comment sendRequest: function (c) {} peut recevoir la valeur de 'c'?
Merci pour vos lumières