JQuery события близко закрываютсяJquery

Программирование на jquery
Ответить
Anonymous
 JQuery события близко закрываются

Сообщение Anonymous »

Ниже приведен мой код jQuery: < /p>

Код: Выделить всё

$("#remove").click(function(e) {
$.confirm({
'title': 'Delete Confirmation',
'message': 'You are about to delete this item.
It cannot be restored at a later time! Continue?',
'buttons': {
'Yes': {
'class': 'blue',
'action': function() {
$.ajax({
'url': "../api/removeHost.php?id=" + $("#id").val(),
'success': function(d) {
var json = JSON.parse(d);
//Display error text
if (json[0] == 0) {
createMessageDialog("General Error", json[1][1]);
//If all is successful reload the listServersBody to reflect the new changes and create the success popup
} else {
$("#listBody").load(lastPopulateAPICall); //Refresh the search\browse list with the new edits/
enableAdd();
createMessageDialog("Success", "Successfully removed!");
}
}
});
}
},
'No': {
'class': 'gray',
'action': function() {} // Nothing to do in this case. You can as well omit the action property.
}
}
});
});....

function createMessageDialog(title, message) {
$.confirm({
'title': title,
'message': message,
'buttons': {
'Ok': {
'class': 'blue',
'action': function() {
alert('dd');
}
},
'No': {
'class': 'gray',
'action': function() {} // Nothing to do in this case. You can as well omit the action property.
}
}
});
}
Функция createmessagegearialog () вызывается, потому что отладки, которые я удаленные, были устранены. Как будто в коробке не хватает времени, чтобы отобразить, прежде чем первый закрывается или что -то в этом роде. Я даже скопировал первое подтверждение диалога в функцию CreateMessageAgeAgeAlog безрезультатно. Я использую следующий подтверждение плагина http://tutorialzine.com/2010/12/better- ... uery-css3/

Подробнее здесь: https://stackoverflow.com/questions/115 ... oo-quickly
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Jquery»