开发者

Same effect in html link tag as rails 3 link_to for jquery

开发者 https://www.devze.com 2023-02-18 09:25 出处:网络
Hi I have the following jquery to open a dialog box when link is clicked: $(function() { $( \'#editdialog\' ).dialog({

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消