X3ntr
X3ntr

Reputation: 155

Fullpage.js doesn't scroll in any browser (chrome, firefox, edge)

I've been trying to make a really simple website using fullpage.js but it just won't scroll a whole section like its supposed to. I've included a snippet with my code. The CSS/JS is pasted directly from the fullpage.css and fullpage.js. I've tried on different browsers, in incognito windows, disabled any extensions or addons etc... it just won't. So far I've figured out the $(window).scroll event won't fire and neither will $('#fullpage').scroll

My html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>

<link rel="stylesheet" type="text/css" href="fullpage.css" />
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256- 
BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"> 
</script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" 
integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" 
crossorigin="anonymous"></script>
<script type="text/javascript" src="fullpage.js"></script>
</head>

<body>

<div id="fullpage">
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
</div>

<script type="text/javascript">
$(document).ready(function() {
  $('#fullpage').fullpage({
  licenseKey: '',
  autoScrolling: true,
  sectionsColor: ['blue', 'yellow', 'green', 'red', 'brown']
  });

  $.fn.fullpage.setAllowScrolling(false);
});
</script>
</body>
</html>

codepen.io snippet

Upvotes: 0

Views: 414

Answers (1)

Alvaro
Alvaro

Reputation: 41595

So far I've figured out the $(window).scroll event won't fire and neither will $('#fullpage').scroll

That's totally normal. Fullpage.js won't fire the scroll event.

I would encourage you to take any of the examples available as your starting point if you can't find what you are missing.

Upvotes: 1

Related Questions