Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

I'm trying to load content into jQueryUI tabs via AJAX using the technique described in the documentation here: http://jqueryui.com/tabs/#ajax.

$('#tabs').tabs();

<div id="tabs">
  <ul>
     <li><a href='/link/to/xml/'>Tab1</li>
     <li><a href='/link/to/more/xml/'>Tab2</li>
  </ul>
</div>

Since my data source is XML, I need to parse and format it before displaying it in the relevant tab. How do I get access to the data after it's been retrieved, but before it's displayed in the tab?

share|improve this question

Take a look at this method http://api.jqueryui.com/tabs/#event-load you can then manipulate the data beforeLoad or after load depending on the event type that you want to handle.

share|improve this answer
    
The load event works, but only if I'm retrieving text type data. If I'm retrieving xml data (which I am), I get a javascript error: HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. Any ideas about why and how to avoid? – jalperin Jun 8 '13 at 12:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.