jQuery UI Ajax tabs problem |
[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,
[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
[eluser]blorriman[/eluser]
Thanks Leonard, Here is the javascript Code: $(function(){
[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.
[eluser]intractve[/eluser]
Did you check what firebug has to say about your ajax request?
[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
[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
[eluser]kimo_gusatava[/eluser]
Try this I saw this on the forum and been using it ever since... Code: <IfModule mod_rewrite.c> |
Welcome Guest, Not a member yet? Register Sign In |