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:
parent
8573544594
commit
14caca09c7
4 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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++;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue