I need to find out how many identical elements I have in a particular diva and then output the total amount when I hover over a separate div.

Tell me how to do this with javascript, jquery?
  • Lay out the code.How do you keep everything there? – Topsy-Turvy Helicopter May 18 '19 at 09:45
  • What is motivated by the presence of the tag"vue"? – The66 May 18 '19 at 09:45
  • The66, it sounds fashionable) – Tired Tortoise May 18 '19 at 10:37

2 Answers 2


Here is
add identical elements to the same class
 x=document.getElementsByClassName('myClass');
x.length is the quantity
  • How then to display the value when you hover? – Enormous25 May 18 '19 at 10:53
  • [[Zorner]], decided? sorry, just now saw – Nervous93 May 18 '19 at 19:52