| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- /* ========================================================================= */
- /* Preloader
- /* ========================================================================= */
- jQuery(window).load(function(){
- $("#preloader").fadeOut("slow");
- // 帮助中心
- // $(".bz-right-conent>div").eq(0).show()
- // let abtn = $(".bz-ul").children('li').click(function(){
- // var _index = $(this).index();
- // //让内容框的第 _index 个显示出来,其他的被隐藏
- // $(".bz-right-conent>div").eq(_index).show().siblings().hide();
- // $(this).addClass("active").siblings().removeClass('active')
- // });
- });
- /* ========================================================================= */
- /* Welcome Section Slider
- /* ========================================================================= */
- $(function() {
- var Page = (function() {
- var $navArrows = $( '#nav-arrows' ),
- $nav = $( '#nav-dots > span' ),
- slitslider = $( '#slider' ).slitslider( {
- onBeforeChange : function( slide, pos ) {
- $nav.removeClass( 'nav-dot-current' );
- $nav.eq( pos ).addClass( 'nav-dot-current' );
- }
- } ),
- init = function() {
- initEvents();
- },
- initEvents = function() {
- // add navigation events
- $navArrows.children( ':last' ).on( 'click', function() {
- slitslider.next();
- return false;
- } );
- $navArrows.children( ':first' ).on( 'click', function() {
- slitslider.previous();
- return false;
- } );
- $nav.each( function( i ) {
- $( this ).on( 'click', function( event ) {
- var $dot = $( this );
- if( !slitslider.isActive() ) {
- $nav.removeClass( 'nav-dot-current' );
- $dot.addClass( 'nav-dot-current' );
- }
- slitslider.jump( i + 1 );
- return false;
- } );
- } );
- };
- return { init : init };
- })();
- Page.init();
- });
- $(document).ready(function(){
- /* ========================================================================= */
- /* Portfolio
- /* ========================================================================= */
- 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;
- });
- /* ========================================================================= */
- /* Menu item highlighting
- /* ========================================================================= */
- // jQuery('#nav').singlePageNav({
- // offset: jQuery('#nav').outerHeight(),
- // filter: ':not(.external)',
- // speed: 2000,
- // currentClass: 'current',
- // easing: 'easeInOutExpo',
- // updateHash: true,
- // beforeStart: function() {
- // console.log('begin scrolling');
- // },
- // onComplete: function() {
- // console.log('done scrolling');
- // }
- // });
- $(window).scroll(function () {
- if ($(window).scrollTop() > 10) {
- $(".navbar-brand a").css("color","#fff");
- $("#navigation").removeClass("animated-header");
- } else {
- $(".navbar-brand a").css("color","inherit");
- $("#navigation").addClass("animated-header");
- }
- });
- /* ========================================================================= */
- /* Fix Slider Height
- /* ========================================================================= */
- // Slider Height
- var slideHeight = $(window).height();
- $('#home-slider, #slider, .sl-slider, .sl-content-wrapper').css('height',slideHeight);
- $(window).resize(function(){'use strict',
- $('#home-slider, #slider, .sl-slider, .sl-content-wrapper').css('height',slideHeight);
- });
-
-
-
- $("#works, #testimonial").owlCarousel({
- navigation : true,
- pagination : false,
- slideSpeed : 700,
- paginationSpeed : 400,
- singleItem:true,
- navigationText: ["<i class='fa fa-angle-left fa-lg'></i>","<i class='fa fa-angle-right fa-lg'></i>"]
- });
- /* ========================================================================= */
- /* Featured Project Lightbox
- /* ========================================================================= */
- $(".fancybox").fancybox({
- padding: 0,
- openEffect : 'elastic',
- openSpeed : 650,
- closeEffect : 'elastic',
- closeSpeed : 550,
- closeClick : true,
- beforeShow: function () {
- this.title = $(this.element).attr('title');
- this.title = '<h3>' + this.title + '</h3>' + '<p>' + $(this.element).parents('.portfolio-item').find('img').attr('alt') + '</p>';
- },
- helpers : {
- title : {
- type: 'inside'
- },
- overlay : {
- css : {
- 'background' : 'rgba(0,0,0,0.8)'
- }
- }
- }
- });
- });
- // ========== END GOOGLE MAP ========== //
- var wow = new WOW ({
- offset: 75, // distance to the element when triggering the animation (default is 0)
- mobile: false, // trigger animations on mobile devices (default is true)
- });
- wow.init();
|