jQuery(document).ready(function($){ $(document).ready(function(){ // ↓scrollTO 設定 $('#nav').localScroll(800); $('.link-btn2').localScroll(800); $('.link-btn3').localScroll(800); // ↓parallax 設定 //.parallax(xPosition, speedFactor, outerHeight) options: //xPosition - Horizontal position of the element //inertia - speed to move relative to vertical scroll. Example: 0.1 is one tenth the speed of scrolling, 2 is twice the speed of scrolling //outerHeight (true/false) - Whether or not jQuery should use it's outerHeight option to determine when a section is in the viewport $('#first').parallax("50%", 0.1); $('#second').parallax("50%", 0.1); $('#third').parallax("50%", 0.1); $('#fourth').parallax("50%", 0.1); $('.bg').parallax("50%", 0.5); $('.bg2').parallax("50%", 0.4); $('.bg3').parallax("50%", 0.4); $('.bg4').parallax("50%", 0.4); // $('.img2').parallax("50%", 2); // $('.img3').parallax("50%", 2); // $('.img4').parallax("50%", 2); }); });