I\'m working on a Rails 4 app. I need to trigger a click in a link using javascript (or jQuery). I have this in my view:
<%= link_to t(\'.fixture\'), fixt
Solved! I've solved this by loading the correct JS and executing it directly, using the 'active' parameter and without need a click on the links. Thanks to everyone who helped me!
If someone wants to know, this is the code I've used (its coffeescript):
tournament = $('#main-wrapper').data('tournament')
$.get '/manager/tournaments/' + tournament + '/fixture.js', (data) -> data
Though its very late and you have got your problem solved, but here is the actual solution :)
$('#fixture-link')[0].click();
You missed [0]
portion.