jQuery conflict
Posted: 27 Nov 2014, 12:22
Hi,
Where are these functions:
There is a jQuery conflict in my code and I have to use noconflict for those function, What is file and directory?
Where are these functions:
Code: Select all
function pdRating(id, vote) {
var result = "pdresult" + id;
var resultvoting = "pdvoting" + id;
var pdRequest = new Request.JSON({
url: "index.php?option=com_phocadownload&view=ratingfilea&task=rate&format=json&4f47c9ea185e33dccfff804a5f1d33cc=1",
method: "post",
onRequest: function(){
$(result).set("html", "<img src=\"http://localhost/chemeng.ir8test/components/com_phocadownload/assets/images/icon-loading2.gif\" alt=\"\" />");
},
onComplete: function(jsonObj) {
try {
var r = jsonObj;
} catch(e) {
var r = false;
}
if (r) {
if (r.error == false) {
$(result).set("text", jsonObj.message);
// Refreshing Voting
var pdRequestRefresh = new Request.JSON({
url: "index.php?option=com_phocadownload&view=ratingfilea&task=refreshrate&small=1&format=json&4f47c9ea185e33dccfff804a5f1d33cc=1",
method: "post",
onComplete: function(json2Obj) {
try {
var rr = json2Obj;
} catch(e) {
var rr = false;
}
if (rr) {
$(resultvoting).set("html", json2Obj.message);
} else {
$(resultvoting).set("text", "Error while requesting rating");
}
},
onFailure: function() {
$(resultvoting).set("text", "Error while requesting rating");
}
})
pdRequestRefresh.send({
data: {"ratingId": id, "ratingVote": vote, "format":"json"}
});
//End refreshing voting
} else {
$(result).set("html", r.error);
}
} else {
$(result).set("text", "Error while requesting rating");
}
},
onFailure: function() {
$(result).set("text", "Error while requesting rating");
}
})
pdRequest.send({
data: {"ratingId": id, "ratingVote": vote, "format":"json"},
});
};