CMS Development

choltzman
Participant

Fixed Navbar not working

I have a fixed navbar that turns black and stays fixed upon scrolling but its not working. 

All the code is there and it was working a few hours ago. 

http://cloud.baass.com/cconnect2018-v5?hs_preview=PhOHeaPb-5954426036

/* The navigation bar */
.span12 widget-span widget-type-cell navbar {width: 100%;}
.navbar {
  background:transparent;
    position: fixed; /* Set the navbar to fixed position */
    top: 0; /* Position the navbar at the top of the page */
  left:0;
  margin: 0px;
  padding:10px 70px 10px 10px;
    width: 100%; /* Full width */
  right:0;
}

<script>

$(document).ready(function(){
  $(window).scroll(function(){
  	var scroll = $(window).scrollTop();
	  if (scroll > 300) {
	    $(".navbar").css("background" , "black");
	  }

	  else{
		  $(".navbar").css("background" , "transparent");  	
	  }
  })
})
</script>
0 Upvotes
2 Replies 2
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Fixed Navbar not working

@choltzman I'm not seeing the navbar in your preview URL

0 Upvotes
choltzman
Participant

Fixed Navbar not working

Its, transparent while on the image (it includes the social media icons, the logo, speakers, etc,) The code is supposed to make it fixed and the make it black upon scrolling. 

 

http://cloud.baass.com/cconnect2018-v5?hs_preview=PhOHeaPb-5954426036

 

0 Upvotes