Added scroll down button
This commit is contained in:
parent
473c6e60d8
commit
98af512c1e
2 changed files with 6 additions and 2 deletions
|
@ -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'));
|
|
@ -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 %}
|
||||
;
|
Reference in a new issue