Ruby on Rails Tuesday, October 30, 2012

Hi all,

for some reason adding the following is doing nothing...

.post.hover  {
background: FAFAFA;

I've got this in my posts.js coffee file

$ -> 
$('.post').hover (event) ->
$(this).toggleClass("hover")

and my index is

<% @posts.each do |post| %>
<div class="post">
<strong><%= post.title %></strong>
<p><%= post.content %></p>
<div class="meta">
<%= link_to time_ago_in_words(post.created_at) + " ago", post %>
<span class="admin">
| <%= link_to "Edit", edit_post_path(post) %> |
<%= link_to "Delete", post, :confirm => "Are you sure you want to delete this post?", :method => :delete %> |
</span>
<div>
</div>

<% end %>


Any ideas? 
 
 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/nLNFo26DvSAJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment