Ruby on Rails Saturday, July 30, 2011

Hi , all! I want to save the stars. but when I reload the browser, The date is initialized. I don't know how to save the date.
Please help me some advise. Thanks for reading my code.

[code]
$(document).ready(function(){
   $(".star").click(function(){
  // $("#star_9").click(function(){
  //   alert("test");
  // });

      $(this).append("<img width='25' height='25' src='/images/star.gif?1311854167' >");     
});
[/code]


# index.html.erb
[code]
      <div class="star">
        <%= image_tag("star.gif",:size => "25x25") %>
       

      </div>
[/code]

--
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.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment