Support » Theme: Akyl » JavaScript TypeError when scrolling

  • Moderator Jose Castaneda

    (@jcastaneda)


    THEME COFFEE MONKEY

    Hi!

    When I first activated the theme and scrolled I got a console error:

    
    Uncaught TypeError: Cannot read property 'top' of undefined
    

    This was because I had no menu set. I was able to remove it by adding:

    
    if ($('.navbar').length === 0) {
    	return
    }
    

    I added it just before the top-nav-collapse class gets added on the scroll event.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘JavaScript TypeError when scrolling’ is closed to new replies.