Hi,

Im currently using Jquery withing my rails project and im having the
following issue.

Once an option is clicked on the navigation bar a partial is loaded in
to a container div. The same thing happens for each of these options.
When the partial is loaded in though I am unable to attach click
events to the buttons within that partial because the partial doesnt
actually pick up on the document.ready (obviously as it didnt exist
when the document originally loaded).

I'm aware that I can fire a function on the completion of the AJAX
request which could possibly attach my clicks, but i would prefer to
keep the javascripts for each partial separate and have them load in
along with the partial.

I've heard that there is an option called 'loadjs' out there. I cant
find much documentation on it... could this be of use to me.

so for example could i fire the ajax load and then on success load in
a .js file by using this method?

Cheers,

Chris

Reply via email to