开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜