Here is what I am trying to simplify:
rhp_left.find('.first').removeClass("s7").addClass("s4");
rhp_left.find('.second').removeClass("s5").addClass("s3").after(extra);
As you can see the second one has .after(extra)at the end.
So, I have the following js function:
function MY_FUNCTION(a, b, c, d)
{
rhp_left.find(a).removeClass(b).addClass(c)d;??
}
jQuery(document).on('click', function() {
MY_FUNCTION('.first', "s7", "s4", d)??
MY_FUNCTION('.second', "s5", "s3", d)??
});
How do I add this .after(extra) as an option??