I am trying to simplify a list of functions down to a single function. Basically I have 6 divs, each with the id #slide_ where the underscore is a number from 1-6 (#slide1, #slide2, etc).
My functions are something like this:
if ($("#slide1").hasClass('active')) {});
There is one of these if statements for each of the #slide_ ids. What is the best way to simplify this so I have have a single function instead of 6 different if statements?