I have installed the Jquery gem and made necessary changes for Jquery to work with rails 3.
I was trying to achieve a simple box fadeout effect when a link is clicked.
Here is my index.html.erb code :-
<div id ="box">
</div>
<%= link_to "Click Here", :remote => true%>
Here is my index.js.rjs code :-
$(function(){
$('a').click(function()
{$('#box').fadeOut();
});
});
However I am not able to get the desired effect. Any suggestion on where I am messing it up?
Thanks,
There are 2 issues with your code. It should be
and
http://jsfiddle.net/QNszJ/