| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- /* ========================================================================= */
- /* Preloader
- /* ========================================================================= */
- jQuery(window).load(function(){
- $("#preloader").fadeOut("slow");
- });
- $(document).ready(function(){
- // 分类过滤排序插件
- var $projectWrapper = $('.project-wrapper');
- $projectWrapper.isotope({
- filter: '*',
- animationOptions: {
- duration: 750,
- easing: 'linear',
- queue: false
- }
- });
- $('.portfolio-filter a').click(function(){
- $('.portfolio-filter .active').removeClass('active');
- $(this).addClass('active');
- var selector = $(this).attr('data-filter');
- $projectWrapper.isotope({
- filter: selector,
- animationOptions: {
- duration: 750,
- easing: 'linear',
- queue: false
- }
- });
- return false;
- });
- // 单页首页翻页特效
- // $('#nav').singlePageNav({
- // offset: $('#nav').outerHeight(),
- // filter: ':not(.external)',
- // speed: 2000,//动画时间
- // currentClass: 'current',
- // easing: 'easeInOutExpo',
- // updateHash: true,
- // beforeStart: function() {
- // console.log('开始滚动');
- // },
- // onComplete: function() {
- // console.log('滚动结束');
- // }
- // });
- // 顶部导航高度变化
- $(window).scroll(function () {
- if ($(window).scrollTop() > 10) {
- $(".navbar-brand a").css("color","#fff");
- $("#navigation").addClass("animated-header");
- $(".el-menu--popup-bottom-start").css("margin-top","15px")
- } else {
- $(".navbar-brand a").css("color","inherit");
- $("#navigation").removeClass("animated-header");
- $(".el-menu--popup-bottom-start").css("margin-top","5px")
- }
- });
- /* ========================================================================= */
- /* Fix Slider Height
- /* ========================================================================= */
- // 首页图片随屏幕高度变化
- var slideHeight = $(window).height();
- let W = $(window).width();
- // $('.sl-slider, .sl-content-wrapper').css('height',slideHeight);
- $(window).resize(function(){
- // $('.sl-slider, .sl-content-wrapper').css('height',slideHeight);
- $("bg-img").css('width',W)
- });
- });
|