Here's what I'm using:
application.js:
$('#hfb').mouseup(function(){
$('#hideform').css('display', 'none');
});
the head from application.html.erb:
<head>
<title>CommentsApp</title>
<%= stylesheet_link_tag 'application', 'grid' %>
<%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" %>
<%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" %>
<%= javascript_include_tag "jquery-rails.js" %>
<%= javascript_include_tag "application.js" %>
<%= csrf_meta_tag %>
</head>
and the thing I want to hide:
<a href="" id="hfb">Hide Form</a>
<div id="hideform">
<% form_for Comment.new, :remote => true do |f| %>
#form stuff
<%= f.submit "Add comment" %>
<% end %>
</div>
What am I missing here ?
html, instead of theerbcode?