12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. main = function () {
  2. //private menbers
  3. //private methods
  4. function init() {
  5. console.log('main is loaded.');
  6. $(window).scroll(function(){
  7. });
  8. }
  9. // scrollAnimate
  10. function scrollAnimate(el,time,top) {
  11. $('html,body').animate({
  12. scrollTop: $(el).offset().top -top
  13. }, time);
  14. }
  15. function intoPage(){
  16. }
  17. {
  18. $(document).ready(function () {
  19. init();
  20. });
  21. }
  22. //public
  23. return {
  24. intoPage: function(){
  25. intoPage();
  26. },
  27. };
  28. };
  29. var main = new main();
  30. // Slider
  31. // var Swiper = new Swiper('#swiper-container名稱', {
  32. // // loop: true,
  33. // slidesPerView : 1,
  34. // navigation: {
  35. // nextEl: '.swiper-button-next',
  36. // prevEl: '.swiper-button-prev',
  37. // },
  38. // breakpoints: {
  39. // 768: {
  40. // slidesPerView : 3,
  41. // slidesPerGroup : 3,
  42. // },
  43. // }
  44. // })