i have a rails 3.1rc4 app and i would like to update a div in my index.html.erb file after every 10sec. I dont no if this can be done via jquery? there use to be a update method but i dont no if it is for only prototype. any sample would be great
Share
Breaking down your question into sub-tasks, here’s what you have to deal with:
For 1, check out jquery’s .get
Description: Load data from the server using a HTTP GET request.For 2, check out jquery’s .html
For 3, check out the setInterval
Final solution,
HTML Code:
Javascript code