1
Fork 0

Added scroll down button

This commit is contained in:
Jake Howard 2015-11-10 23:24:28 +00:00
parent 473c6e60d8
commit 98af512c1e
2 changed files with 6 additions and 2 deletions

View file

@ -1,9 +1,12 @@
var React = require('react');
var ProjectImages = require('./components/project-images');
window.scrollToElement = function(ident) {
$('html, body').animate({scrollTop: $(ident).offset().top}, 1000);
}
$(window).load(function(){
$(window).trigger('scroll').trigger('resize');
var s = skrollr.init();
});
React.render(<ProjectImages />, document.getElementById('project-images'));

View file

@ -8,7 +8,7 @@
<img src="http://placehold.it/230x230"/>
<h1>Hello, world!</h1>
<p>Some random subtitle</p>
<p>V</p>
<p><a onClick="scrollToElement('#intro-text')" href="#">V</a></p>
</div>
</div>
<div class="container-fluid" id="intro-text">
@ -20,3 +20,4 @@
<div class="container-fluid" id="project-images"></div>
{% endblock %}
;