I'm trying to use one piece of code to expand different content when different sections are clicked on. The way I'm trying to achieve this is by giving these tags a class name like class="counter_1", class= "conter_2"...and naming the subsequent content with numbers corresponding to the span class names. I've so far been able to name my span tags with jQuery:
$("span").each(function(i){
var $this = $(this);
$this.addClass("title" + (i+1));
});
but I'm not quite sure where to go from here. How do I target these dynamically added classes to have them expand the content I want to show?
Sorry if this description isn't so clear, I'm very new to jQuery :(