Topic: It doesn't work jquery...

Hi all! I want to add alert message via jquery when User clicks <div id="star">star</div>.
But, It can't work. 
Please teach me some advice.


# posts/index.html.erb

<% @posts.each do |post| %>
    <td><%= %></td>
    <td><%= post.content %></td>
    <div id="like">
    <td><div id="star">star</div></td>
    <td><%= post.created_at.strftime("%Y年%m月%d日%H:%M:%S") %></td>
<% end %>


# application.js

$(document).ready(function() {

Re: It doesn't work jquery...

Do you have jquery.js included in your app? Check app's html source if jquery is correctly set.

Re: It doesn't work jquery...

Thanks It worked.
I made a awful error. I update the <div> to <class...> ,then It worked correctly.