I have the following code
<td><a href="#" id="dialog_link-19" class="ui-state-default ui-corner-all">Click here</a></td> <td><a href="#" id="dialog_link-25" class="ui-state-default ui-corner-all">Click here</a></td> <td><a href="#" id="dialog_link-33" class="ui-state-default ui-corner-all">Click here</a></td> <td><a href="#" id="dialog_link-556" class="ui-state-default ui-corner-all">Click here</a></td>
#dialog_link
dynamically generated.
in my js I need to know what was clicked on.
this is my js
$('#dialog').dialog({ autoOpen: false, width: 600, buttons: { "Ok": function() { $(this).dialog("close"); }, "Cancel": function() { $(this).dialog("close"); } } }); // Dialog Link $('#dialog_link').click(function(){ $('#dialog').dialog('open'); $.ajax({ url: "teams/pp", type: "POST", data: success: function( data ){ console.log(data); } }); return false; });
source share