jquery accessor id vs class? -


at link: http://jqueryui.com/demos/tabs/ when "view source", have:

<div id="tabs">     <ul>         <li><a href="#tabs-1">...</a></li>         <li><a href="#tabs-2">...</a></li>         <li><a href="#tabs-3">...</a></li>     </ul>     <div id="tabs-1">...</div>     <div id="tabs-2">...</div>     <div id="tabs-3">...</div> </div> 

so want know, how implement class instead of id,
considering portion of code used multiple times may loaded ajax,
in different times.

for dynamically adding tabs, there add method auto-name tab controls you, letting re-use tab creation code repeatedly.

when tab added page, fires add event, shown in tabs doc page:

var $tabs = $('#example').tabs({     add: function(event, ui) {         $tabs.tabs('select', '#' + ui.panel.id);     } }); 

from http://jqueryui.com/demos/tabs/#default


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -