jQuery UI Ajax tabs problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: jQuery UI Ajax tabs problem (/showthread.php?tid=33567) |
jQuery UI Ajax tabs problem - El Forum - 08-31-2010 [eluser]blorriman[/eluser] Sorry if the this has been answered before, but I couldn't find it. I have a jQuery tabs set up that works with the content already loaded with the page, but I want to load remote content when the tab is clicked. I read through the jQuery tabs - load content via Ajax - but I can't get it to work, it just opens the content in a new page. here is my view : Code: <div id="tabs"> As you can see from the last tab the href is /start/remote tab which is just loading the view: Code: function remote_tab() { Any direction would be greatly appreciated. Cheers, jQuery UI Ajax tabs problem - El Forum - 08-31-2010 [eluser]leonardteo[/eluser] I think the problem might be the actual jquery. Could you post the Javascript you are calling? I'm assuming that you're using JQuery UI: http://jqueryui.com/demos/tabs/ If not, you have to prevent what is known as "event bubbling" so that when you bind a click function to each of the tabs, you have to return false, or it will tell the browser to load a new page. Leonard jQuery UI Ajax tabs problem - El Forum - 08-31-2010 [eluser]blorriman[/eluser] Thanks Leonard, Here is the javascript Code: $(function(){ jQuery UI Ajax tabs problem - El Forum - 08-31-2010 [eluser]leonardteo[/eluser] Hey, Hmmm ok it's not the javascript. If you had implemented your own js for the tabs you would have needed to prevent event bubbling. I just took a quick look and implemented a mixed jquery pre-loaded and ajax tab very similar to yours above. Unfortunately I don't know why your implementation isn't working...cuz it should.... *shrug* http://www.leonardteo.com/jquerytabs/ Sorry, I don't have more time right now to trouble-shoot this issue.... L. jQuery UI Ajax tabs problem - El Forum - 08-31-2010 [eluser]intractve[/eluser] Did you check what firebug has to say about your ajax request? jQuery UI Ajax tabs problem - El Forum - 09-01-2010 [eluser]kimo_gusatava[/eluser] Code: <div id="tabs"> I think that you should set the .htaccess first if you haven't set it use index.php/remote/tab jQuery UI Ajax tabs problem - El Forum - 09-01-2010 [eluser]blorriman[/eluser] Thanks kimo_gusatava, I've just got the standard .htaccess and don't know anything about it. How would I allow access to the remote/tab.php - and other files I would want to access? Cheers, Bob jQuery UI Ajax tabs problem - El Forum - 09-01-2010 [eluser]kimo_gusatava[/eluser] Try this I saw this on the forum and been using it ever since... Code: <IfModule mod_rewrite.c> |