jQuery tabs content via ajax
Can anyone help me figure out why this isn't working? http://jsfiddle.net/87pWn/
I basically copied the source from here: http://jqueryui.com/demos/tabs/ajax.htm开发者_如何转开发l
You are trying to load in content via XMLHttpRequest with a relative base path.
<li><a href="ajax/content1.html">Tab 1</a></li>
When you click on a link, the code is trying to take the content from "http://jsfiddle.net/87pWn/ajax/content1.html", which is why the error handler is being fired.
$(anchor.hash)
should be $('a.hash')
You must select jQuery 1.8.2 or higher. Also you must select jQuery UI, because jQuery UI is main thing you need to see tabs.
精彩评论