Topic: Simple Jquery Box hide is not working with Rails 3

Hi,  I was trying to add a simple box fade out effect just to see how Jquery works in Rails 3. I have installed the Jquery plugin and made necessary changes in application.rb file in the config folder.   

Below is my code:- 

index.html.erb 

<div id ="box">
</div>
<%= link_to "Click Here", :remote => true%>


index.js.erb

$(function(){

$('a').click(function()
    {$('#box').fadeOut();
    });
});

Nothing happens when I click the click here link. Can some point out the mistake which I am making?

Last edited by Akram (2011-09-06 01:36:28)