Created
June 27, 2012 13:26
-
-
Save dtolj/3004058 to your computer and use it in GitHub Desktop.
periodically_call_remote jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#assets/javascripts/refresh.js | |
$(document).ready( | |
function(){ | |
setInterval(function(){ | |
$('#mydiv').load('action'); | |
}, 16000); | |
}); | |
#CONTROLLER | |
def action | |
@tm=Random.rand(11) | |
end | |
#VIEWS | |
#action.haml | |
=@tm | |
#index.haml | |
%div.mydiv | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment