这是我在haml中的link_to
#actions
.btn-group
= link_to report_path(type: 'link', search: params[:search]) ), id: 'download', class: '1_download report-btn' do
= link_to report_path(type: 'link', search: params[:search]) ), id: 'download', class: '2_download report-btn' do
这是我的咖啡但是没有效果
target_link = switch
when $("#report_actions a.1_download") then target_link = $("#report_actions a.1_download")
when $("#report_actions a.2_download") then target_link = $("#report_actions a.2_download")
when $("#report_actions a.3_download"), $("#report_actions a.3_download")
if target_link.length > 0
init_socket()