3
I’m with a html
which has five elements div
.
I would like you to help me somehow to make a Get the size of this matrix in Jquery.
Ex: with the function eq()
, consige take a page element, referenced by matrix.
If I use the following code $( "body" ).find( "div" ).eq( 2 ).css( "background-color","blue");
, the third div
the matrix will have the background in blue.
How to get the total value of this matrix?
Have you tried
$( "body" ).find( "div" ).length
?– Sergio
By "total value" it is unclear whether you want the number of Divs, or an array with all Divs inside. Anyway, my answer points the way.
– bfavaretto
@Sergio thanks, Solved the problem!
– Franck Costa
@Franckcosta, great! I also left an answer below. You can mark as correct if that was the solution you were looking for.
– Sergio