Ruby on Rails ajax - dynamically loading all pages -
I have a flash media player (similar to lala.com) which needs to be continued on the stream while people click I do not want to use an iframe.
So, I dynamically load all the site pages with AJAX, it does not matter what people link.
I've got this job with Rail and JQuery for a single page. With this method, I have to keep a file for a file that is called a controller. Js.erb file is called example: example.com/home and I have to be an index.js.erb in Home Dyer's thoughts to answer it.
I used it:
To get it to work on one page, but it would not be dry to copy each controller to .js.erb files. .
Is there anything I can do with the main app_controller or routes?
I found a way to do this. You can load whatever page you want through the jquery load method.
$ ('# result'). Load ('ajax / test.html #container');
Then they will be placed in the div with the #trett ID, you can also specify a page piece with # containers so that you can only load the portion you want. This does not have to be successful with all your controllers with any additional JS.
Comments
Post a Comment