I have a common class name which repeats itself in different pages. As you can see the class name follows this convention:
article-number-slide-number
These links open a certain slide information. This number is different for each slide, therefore I would like to know if its possible to target
$('.hotspot').click(function() {
$('...SLIDE-2').animate({right: "0"}, 500);
return false;
});
Is it possible to target the end of the class name of an element?
<div class="hotspots-image">
<img class="image"
src="IMG-SRC"
alt=""
/>
<h1 class="home-banner">
<em>lala collection</em><br>
white & fluffy
</h1>
<a class="hotspot article-1-slide-2" href="#">
<span class="hotspot-icon pp-icon icon-hotspot"> </span>
<span class="hotspot-label pp-icon icon-anime-left-arrow">article 1</span>
</a>
<a class="hotspot article-2-slide-2" href="#">
<span class="hotspot-icon pp-icon icon-hotspot"> </span>
<span class="hotspot-label pp-icon icon-anime-left-arrow">article 2</span>
</a>
<a class="hotspot article-3-slide-2" href="#">
<span class="hotspot-icon pp-icon icon-hotspot"> </span>
<span class="hotspot-label pp-icon icon-anime-left-arrow">article 3</span>
</a>
<a class="hotspot article-4-slide-2" href="#">
<span class="hotspot-icon pp-icon icon-hotspot"> </span>
<span class="hotspot-label pp-icon icon-anime-left-arrow">article 4</span>
</a>
<a class="hotspot article-5-slide-2" href="#">
<span class="hotspot-icon pp-icon icon-hotspot"> </span>
<span class="hotspot-label pp-icon icon-anime-left-arrow">article 5</span>
</a>
<a class="hotspot article-6-slide-2" href="#">
<span class="hotspot-icon pp-icon icon-hotspot"> </span>
<span class="hotspot-label pp-icon icon-anime-left-arrow">article 6</span>
</a>
</div>