1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 18:29:40 +02:00

Add unobserve equivalent in jQuery

This commit is contained in:
Afterster 2013-11-21 00:35:17 +01:00
parent 8573544594
commit 14caca09c7
4 changed files with 9 additions and 3 deletions

View file

@ -27,12 +27,18 @@ $(document).ajaxComplete(function () {
// Post the contents of a form.
function ajaxPost(url, input, source) {
//$('#' + input)
if ($(source)) {
$(source).off('click', function(){ ajaxPost(url, input, source); });
}
$.ajax(url, { success: processContents, type: 'post', data: $('#'+input).serialize() });
} // ajaxPost
// ajaxPut
// Get response from the specified URL.
function ajaxPut(url, source) {
if ($(source)) {
$(source).off('click', function(){ ajaxPut(url, source); });
}
$.ajax(url, { success: processContents, type: 'post', dataType: 'xml' });
} // ajaxPut

View file

@ -64,7 +64,7 @@ var SearchRow = {
$('searchtable').appendChild(row);
rowCount++;
$(cells[3]).click(function(e){if(rowCount > 1) { Element.remove(this.parentNode); rowCount--; }});
$(cells[3]).on('click', function(){if(rowCount > 1) { Element.remove(this.parentNode); rowCount--; }});
rowIter++;
},