mains.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. $(document).ready(function(){
  2. // 分类过滤排序插件
  3. var $projectWrapper = $('.project-wrapper');
  4. $projectWrapper.isotope({
  5. filter: '*',
  6. animationOptions: {
  7. duration: 750,
  8. easing: 'linear',
  9. queue: false
  10. }
  11. });
  12. $('.portfolio-filter a').click(function(){
  13. $('.portfolio-filter .active').removeClass('active');
  14. $(this).addClass('active');
  15. var selector = $(this).attr('data-filter');
  16. $projectWrapper.isotope({
  17. filter: selector,
  18. animationOptions: {
  19. duration: 750,
  20. easing: 'linear',
  21. queue: false
  22. }
  23. });
  24. return false;
  25. });
  26. // 单页首页翻页特效
  27. // $('#nav').singlePageNav({
  28. // offset: $('#nav').outerHeight(),
  29. // filter: ':not(.external)',
  30. // speed: 2000,//动画时间
  31. // currentClass: 'current',
  32. // easing: 'easeInOutExpo',
  33. // updateHash: true,
  34. // beforeStart: function() {
  35. // console.log('开始滚动');
  36. // },
  37. // onComplete: function() {
  38. // console.log('滚动结束');
  39. // }
  40. // });
  41. // 顶部导航高度变化
  42. // $(window).scroll(function () {
  43. // if ($(window).scrollTop() > 10) {
  44. // $(".navbar-brand a").css("color","#fff");
  45. // $("#navigation").addClass("animated-header");
  46. // $(".el-menu--popup-bottom-start").css("margin-top","15px")
  47. // } else {
  48. // $(".navbar-brand a").css("color","inherit");
  49. // $("#navigation").removeClass("animated-header");
  50. // $(".el-menu--popup-bottom-start").css("margin-top","5px")
  51. // }
  52. // });
  53. /* ========================================================================= */
  54. /* Fix Slider Height
  55. /* ========================================================================= */
  56. // 首页图片随屏幕高度变化
  57. var slideHeight = $(window).height();
  58. let W = $(window).width();
  59. // $('.sl-slider, .sl-content-wrapper').css('height',slideHeight);
  60. $(window).resize(function(){
  61. // $('.sl-slider, .sl-content-wrapper').css('height',slideHeight);
  62. $("bg-img").css('width',W)
  63. });
  64. });