For some reason when I add a class to an element using Jquery I cannot perform a function using the class name just added:
$('.openslidecontent .arrow.off').click(function() {
$('.openslidecontent,.rightwrapper .arrow').removeClass('off')
$('.openslidecontent,.rightwrapper .arrow').addClass('on');
return false;
});
$('.openslidecontent .arrow.on').click(function() { // THIS FUNCTION DOES NOT EXECUTE
$('.openslidecontent,.rightwrapper .arrow').removeClass('on');
$('.openslidecontent,.rightwrapper .arrow').addClass('off');
return false;
});