Not able to modify the Ok Cancel button in jQuery -
we using jquery change orginal ok/cancel button yes/no button calling below function.
function yesnodialog(button1, button2, element) { var btns = {}; btns[button1] = function() { element.parents('li').hide(); $(this).dialog("close"); }; btns[button2] = function() { $(this).dialog("close"); }; $("<div></div>").dialog( { autoopen: true, title: 'condition', modal:true, buttons:btns } } we added dependent js & css files project still 'object required' error when call yesnodialog function
can please on this?
you missed ); after dialog call
must be:
function yesnodialog(button1, button2, element) { var btns = {}; btns[button1] = function() { element.parents('li').hide(); $(this).dialog("close"); }; btns[button2] = function() { $(this).dialog("close"); }; $("<div></div>").dialog( { autoopen: true, title: 'condition', modal:true, buttons:btns }); }
Comments
Post a Comment