Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll not responding #47

Open
dcp3450 opened this issue Jun 29, 2018 · 2 comments
Open

Scroll not responding #47

dcp3450 opened this issue Jun 29, 2018 · 2 comments

Comments

@dcp3450
Copy link

dcp3450 commented Jun 29, 2018

Using the CDN I appear to be following the setup but it the scroll doesn't appear to be responding:

html:

  <body>
	<div id="content">
	
		<div id="map-container">
			<div class="map">
			<nav>
				<ul>
					<li><a href="#one" id="music" class="trigger-overlayx" data-scroll><span class="icon"><img src="assets/img/navigation/MUSIC_ICON.png" /></span>Music</a></li>
					<li><a href="#two" id="tour" class="trigger-overlayx" data-scroll><span class="icon"><img src="assets/img/navigation/TOURING_ICON.png" /></span>Touring</a></li>
					<li><a href="#three" id="video" class="trigger-overlayx" data-scroll><span class="icon"><img src="assets/img/navigation/VIDEO_ICON.png" /></span>Video</a></li>
					<li><a href="#four" id="gallery" class="trigger-overlayx" data-scroll><span class="icon"><img src="assets/img/navigation/PHOTO_ICON.png" /></span>Photo</a></li>
				</ul>
			</nav>
			
			<div class="map-corner" id="one"><img src="assets/img/slices/top_left.jpg" /></div>
			<div class="map-corner" id="two"><img src="assets/img/slices/top_right.jpg" /></div>
			<div class="map-corner" id="three"><img src="assets/img/slices/bottom-left.jpg" /></div>
			<div class="map-corner" id="four"><img src="assets/img/slices/bottom_right.jpg" /></div>
			</div>
		
		</div>
	
	</div>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
	<script src="https://unpkg.com/sweet-scroll/sweet-scroll.min.js"></script>
	<script src="assets/js/main.js"></script>
	<script src="assets/js/overlays.js"></script>
  </body>

js:

document.addEventListener('DOMContentLoaded', () => {
  const sweetScroll = new SweetScroll({ 
		vertical: true,
		horizontal: true
	},'#map-container');
}, false);

I'm not getting any errors. When I select a navigation item the url changes and it jumps.

@firestar300
Copy link

firestar300 commented Oct 2, 2018

Same issue for me in a create-react-app.

@wadackel
Copy link
Owner

wadackel commented Mar 7, 2019

@dcp3450 @firestar300

I'm sorry I got very late... 😢
I think that the problem has been solved with the latest version 4.0.0.
If you still have issues, I'd be happy to try sweet-scroll again after updating 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants