Hi I have the following jquery to open a dialog box when link is clicked:
$(function() {
$( '#editdialog' ).dialog({
autoOpen: false,
width: 600,
modal: true
});
$('#edit-dialog').click(function(){
$('#editdialog').dialog('open');
return false;
});
}); In the view i have
<%= link_to("E开发者_如何学运维dit", {:controller => "projects", :action => "edit"}, {:id => "editdialog"} ) %>
Problem: The link does not execute the dialog box. Thanks for the help
Your id on the link is editdialog, while you're setting the click function on #edit-dialog.
精彩评论