For some reason jQuery.off( click ) doesn t seem to be working here. When the Yes button is clicked in the model another model just pops up. What am I doing wrong?
法典:
$(function(){
//If there are warnings on the page bind alert
if ($( .renewal-warning ).length > 0){
(function (){
$( #signRentalContainer ).on( click , .renewal-warning , function(e){
var buttonHandle = this;
//Prevent submission
e.preventDefault();
//Show warning model
$.modal({
content: $( #renewalWarning ).html(),
title: "Order Renewal Warning",
buttons: {
Yes : function(win) { $(buttonHandle).off( click ).click(); },
No : function(win) { win.closeModal(); }
},
maxWidth: 250,
closeButton: false
});
});
})();
}
});