Attach ui-widget to dynamic element
When dynamically creating a div using an .ajax() function. I'm unable to attach the .tabs() widget to the newly created <div>.
This link creates the new div and pulls the #tabs div from "somefile.php"
- <a href="newdiv">Creates New Div</a>
- <div id="newdiv">
- <div id="tabs">
- <ul>
- <li>Example One</li>
- <li>Example Two</li>
- </ul>
- </div>
- </div>
Here is the script I'm using. Output - Error: (d || "").split is not a function
- $( "#tabs" ).live(function(){
$(this).tabs()
});
I'm able to show the tabs when adding an event parameter, However I want the tabs to display without an event.
- $( "#tabs" ).live("click", function(){
$(this).tabs()
});
Someone please help me understand what I'm missing. I've been stuck on this for 3 days.
Chris