In the previous recipe, we looked at how a PanelBar widget can be created using the markup present in the page. In this recipe, we will look at how the content of each list item in the PanelBar can be loaded by fetching the same from the server using Ajax.
As observed in the previous recipe, the content for each list item was wrapped inside a
div element. By doing so, the size of the page had increased, which in turn would have affected the performance of the application. A workaround to this is to load the content of each list item when it is requested using Ajax.
Let's consider the same example; here, the list headings are specified in the markup and the
div elements are used as placeholders. ...