Hey.
I'm having a unknown number of elements like so:
<div class="item item-1"></div>
<div class="item item-2"></div>
<div class="item item-3"></div>
What I want to do, is check if each item has a classname starting with "item-". If true, then extract the id. Something like this:
$("container").each(function
if ($(this).hasClassNameStartingWith("item-"))
console.debug(theId);
);
How is this possible?
Thanks in advance!