I've got a piece of code :
/views/measurements/index.html.erb
<b>Status:</b><div name="status" id="status"></div>
<%= periodically_call_remote(:update => "status", :frequency => 5, :url => { :action => :last_measurement } ) %>
/controller/measurements_controller.rb
def last_measurement
@measurement = Measurement.find(:last)
render :partial => 'last_measurement'
end
/views/_last_measurement.html.erb
<%= @measurement.time %> ; <%= @measurement.data %>
It works nicely until I add <%= javascript_include_tag "jquery-1.4.2.min.js" %> in the view.
Once I add the jQuery, I can see in the console that the script works, but the div is not updating.
Why is jQuery braking my code ? Is there a way to fix this ?