Check out this code snippet: https://jsfiddle.net/rajat_bansal/rtapaew5/1/
The jQuery section below is causing some trouble:
$(document).ready(function(e) {
$(".sub-handle").click(function() {
if(!$(this).hasClass('showing-sub')){
$(this).find(".submenu").addClass('showing-sub');
$(this).addClass("sidebarElementDivOnClick");
$(this).find("a").addClass("outerMenuItem");
}
else{
$(this).find(".submenu").removeClass("showing-sub");
}
});
$(".innerMenuItem").click(function(){
$(this).toggleClass("innerMenuItemOnClick");
});
});
I'm having difficulty removing a class with this code. It might be a small issue as I am new to jquery. Any assistance and explanation would be highly appreciated. Thank you!