question really says it all,
if have an element
<span class="a-class another-class test-top-left"></span>
how can i get the classname, beginning with “test-” into a string variable so i can then extract the top and left words from that classname into separate variables and use them.
Where test[0] will contain “top” and test[1] will contain “left”.
Here’s the working demo: http://jsfiddle.net/kayen/QJCpc/