https://jsfiddle.net/11632r3m/
My attempt to create a simple color change for a div element in my HTML file has been unsuccessful. The provided fiddle showcases the issue.
HTML
<div class="pagewrap"></div>
<div class="sidebar"></div> <!--Sidebar container-->
<div class="mainbody"></div> <!--Main Body container-->
CSS
.sidebar {
float: left;
background-color: yellow;
width: 10%;
height: 100%;
position: fixed;
}
jQuery
$( document ).ready(function() {
$(".sidebar").click(function() {
$(this).css("background-color","black");
});
});