jquery read one class amount between 2 class -


The sub-name in my class is between 5 times and 1 to 2, and between 2 to 3 and 3 to 4 In between I have the class title named and I need to know how many times the title is between those 2 sub.

I know that the second sub first class: ('.page_channel .sub: eq (1)') Second: ('.page_channel .sub: eq (2)')

But how will it know, how many square titles are between them, 2 sub classes?

I have tried that $ ('. Page_channel .sub: eq (1)'). NextAll ('.page_channel .sub: eq (2)'). And self () length; But definitely it does not work in this way

HTML:

ago All IDs change the ID attribute in the class and you can get the title class div in such a way that:

  alert ($ (". Page_channel: eq (0)"). (".title") length) / div with div title with first title page_channel div and second page_channel div  

Update:

If you want the square Want the amount of both div between the use of:

  


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -