I am using jQuery ui in a rails application. I want to load content of the tab via ajax when the tab is clicked. I have evverything set up correctly, i.e. my controller responds to a xhr request and it simply replaces the content of a certain div (inside the tab content). This all seems to work fine with prototype, however, If I try to re-use the same controller code and call the index.js action from jQuery ui tabs, it does not seem to work, I am guessing it’s because the response sent is in prototype and jquery does not know what to do with it?
What’s the best way to accomplish this? I would rather not include another jQuery plugin, since I am using prototype extensively (at least for the xhr responses) and rather not rewrite a bunch.
Update: The code is at http://pastie.org/1024228. I am getting the error on show.html.erb at line 37.
Thanks
Well I just followed Ryan’s Bates episode on jquery, creating a index.rjs.erb file and using plain jquery for that action to populate the div.