I'm using jquery tabs in my web application. The tabs are created dynamically depending on the user query result. I have a couple issues:
My tab is pointing to
<div>content with the corresponding id. When the user clicks the tab, the content is filled with a result of a webservice request (not relevant to the issue). My first problem is that when I add the items inside the tab (<div>tags), I see that it's not being placed inside the panel of the tab. I'm usingselectedTab.append("<div class=itemSummary>" + getItemDetails(element) + "</div>")to add a new<div>section to the tab. However, I do see new items being added outside the border of the tab panel. Am I doing something wrong here?Simple question: how can I programmatically clear the tab content? I need the tab content to be cleared before I add new items to it.
Thanks!
selectedTab.html(VarWithHTMLcontent);and make sure to store new content into the content variable before you call this line. This line will replace all inside content with whatever is stored in the variable.