tags:

views:

32

answers:

0

Hi i m using the code below, HTML:

This is the dialog box which will open on onlick.but i want different dialog boxes to be opened on different onclicks.

JS: /// Dialog ////

$('#dialog').dialog({ modal: true ,
 autoOpen: false,
 width: 300,
 buttons: {
  "Ok": function() { 
   $(this).dialog("close"); 
  }, 
  "Cancel": function() { 
   $(this).dialog("close"); 
  } 
 }
});

// Dialog Link
$('#dialog_link').click(function(){
 $('#dialog').dialog('open');
 return false;
});

//hover states on the static widgets
$('#dialog_link, ul#icons li').hover(
 function() { $(this).addClass('ui-state-hover'); }, 
 function() { $(this).removeClass('ui-state-hover'); }
);
/// Dialog ////

This works fine when i have one #dialog_link and #dialog, but i want it to work on multiple.