count the number of existing tabs in jquery? -


I'm using a dynamic jQuery tab widget that adds / removed the tabs created from the program.

How do I check through jQuery and count how many existing tabs exist in the widget?

I am using this code, but it does not work:

  $ ('# container-1'> 'ul'). Tab ('add', tab name, name); Var newTab; If ($ ('$ container-1 & gt; li'). Size () & lt; 0) {newTab = $ (tabName) .css ('display', 'block')} other {newTab = $ (tabName ) CSS ('display', 'none'); } NewTab.html ('& lt; iframe src = "ViewPatient.aspx? Pname =' + name + '" width = "100%" framebroom = "0" scrolling = "no" height = "300"> & Lt; / iframe & gt; ');  

  var tabCount = $ (tabContainer). Tabs ("length");  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -