jquery - Applying function to ui dialog button click -


i'm trying create multi-click function inside click event ui dialog button. want toggle between multiple divs show different content inside dialog user clicks 'next' button. @ moment can seem trigger 1 event.

here js works triggers 1 event.

dialog.dialog({         // add close listener prevent adding multiple divs document         close: function(event, ui) {             // remove div data , events             dialog.remove();         },         modal: true,         resizable: false,         draggable: false,         stack: false,         width: 480,         buttons: [             {                 text: "cancel",                 click: function() { $(this).dialog("close"); }             },             {                  id: "cta",                 click: function() {                     $('.ui-dialog').css('top', '100px');                     $(this).find('#modal p').remove();                 }             }         ]     }); 

the main section question last click inside 'buttons'. possible? tried call on function rather setting inside click wouldn't work either.

are looking this?

http://jsfiddle.net/rsarika/h7fsf/


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 -