There are several divs on my page with classes my_widget-2
, my_widget-8
, etc.
What javascript or jQuery code can I use to get the number "2" (ie. the number that appends the first matching widget)?
Thanks in advance for your input.
Note: If I were to write this question again, I would change the order of these class names and ask for a way to get "8" in order not to possibly give the impression that I want the smaller number.