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     }); } 

demo


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -