Commit 676eb570 authored by Goutte's avatar Goutte

Remove more javascript.

parent 450dc69b
var isTouch = window.DocumentTouch && document instanceof DocumentTouch; var isTouch = window.DocumentTouch && document instanceof DocumentTouch;
function scrollHeader() { // function scrollHeader() {
// Has scrolled class on header // // Has scrolled class on header
var zvalue = $(document).scrollTop(); // var zvalue = $(document).scrollTop();
if ( zvalue > 75 ) // if ( zvalue > 75 )
$("#header").addClass("scrolled"); // $("#header").addClass("scrolled");
else // else
$("#header").removeClass("scrolled"); // $("#header").removeClass("scrolled");
} // }
//
// function parallaxBackground() {
// $('.parallax').css('background-positionY', ($(window).scrollTop() * 0.3) + 'px');
// }
function parallaxBackground() { jQuery(document).ready(function($) {
$('.parallax').css('background-positionY', ($(window).scrollTop() * 0.3) + 'px');
}
jQuery(document).ready(function($){ // // Dropdown navigation fix
// var lists = $("nav.dropmenu > ul > li > ul > li > ul > li > ul");
scrollHeader(); //
// console.log(lists);
// Scroll Events // // console.log(lists.width());
if (!isTouch){ //
$(document).scroll(function() { // lists.each(function(k, list){
scrollHeader(); // console.log("key", k);
parallaxBackground(); // console.log("list", list);
}); // console.log($(list).width());
}; // $(list).css('left', "-"+$(list).width()+"px")
// });
// Touch scroll // scrollHeader();
$(document).on({ //
'touchmove': function(e) { // // Scroll Events
scrollHeader(); // Replace this with your code. // if ( ! isTouch) {
} // $(document).scroll(function() {
}); // scrollHeader();
// parallaxBackground();
// });
// }
//
// // Touch scroll
// $(document).on({
// 'touchmove': function(e) {
// scrollHeader(); // Replace this with your code.
// }
// });
// //Smooth scroll to start // //Smooth scroll to start
// $('#to-start').click(function(){ // $('#to-start').click(function(){
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
{# … No we did not, not until we remake the language selector #} {# … No we did not, not until we remake the language selector #}
{% do assets.addJs('jquery', 101) %} {% do assets.addJs('jquery', 101) %}
{# {% do assets.addJs('theme://js/jquery.treemenu.js', {group:'bottom'}) %}#} {# {% do assets.addJs('theme://js/jquery.treemenu.js', {group:'bottom'}) %}#}
{% do assets.addJs('theme://js/site.js', {group:'bottom'}) %} {# {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}#}
{% endblock %} {% endblock %}
{{ assets.js()|raw }} {{ assets.js()|raw }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment