home
/
zktecojo
/
public_html
/
app
/
controllers
➕ New
📤 Upload
✎ Editing:
main.js
← Back
$(document).ready(function() { //image as background $('#bannerSlider .item').each(function(){ //console.log('asdsad') $item = $(this).find('img.banner'); $(this).css( 'background-image', 'url(' + $item.attr( 'src' ) + ')' ); $item.remove(); }); var ww = $(window).width(); if(ww<641){ $('.innerBannerImgWrap').each(function(){ //console.log('asdsad') $item = $(this).find('img'); $(this).css( 'background-image', 'url(' + $item.attr( 'src' ) + ')' ); $item.remove(); }); } //image as background // SLIDER HEIGHT window height var wh = $(window).height(); $('#bannerSlider .item').css({ "height" : wh - 90 }); //DEVICE ORIENTAION DETECT $(window).on( "orientationchange", function( event ) { var wh = $(window).height(); var ww = $(window).width(); //var hh = $('header').height(); //alert( "This device is in " + window.orientation + " mode!" ); switch(window.orientation){ case -90: case 90: //alert('landscape'); $('#bannerSlider .item').css({ "height" : wh }); break; default: // alert(wh) $('#bannerSlider .item').css({ "height" : wh }); break; } // alert($('.phoenix-slider').height()) }); //DEVICE ORIENTAION DETECT // SLIDER HEIGHT window height // hover add class $(".featService .featButton").hover( function(){ // Mouse Over //$(this).parent().addClass("featServiceHovered"); $(this).parent().addClass("featServiceHovered"); // $('.featServiceHovered .featuredHoverBlock').delay(100).fadeIn(3000); $('.featServiceHovered .featuredHoverBlock').slideDown(800); }, function(){ // Mouse Out $(this).parent().removeClass("featServiceHovered"); $('.featuredHoverBlock').fadeOut('fast'); } ); // hover add class //on click toggle class //$('.navbar-toggle').click(function(e){ // e.preventDefault(); //alert('zxc') // $(this).find('span').toggleClass('iconfa-lock iconfa-unlock'); // }); $(".navbar-toggle").click(function(){ $(".rightMenubarWrapper").toggleClass("show_menu"); // $("#menu_icon").toggleClass("close_menu"); // return false; }); //on click toggle class //banner owl carasoul var owl = $("#bannerSlider"); // var $owlSlides = owl.children('div'); // if ($owlSlides.length > 1) { owl.owlCarousel({ navigation : true, navigationText: [ "<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>" ], pagination:false, singleItem : true, autoPlay : 5200, transitionStyle : "fade" }); // } //banner owl carasoul //owl carasoul with thumbanils var sync1 = $("#sync1"); var sync2 = $("#sync2"); var carousel = $("#sync2"); carousel.owlCarousel({ navigation:true, items : 3, navigationText: [ "<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>" ], pagination:false }); sync1.owlCarousel({ singleItem : true, autoPlay: 4000, slideSpeed : 1000, navigation: false, navigationText: [ "<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>" ], pagination:false, afterAction : syncPosition, responsiveRefreshRate : 200 }); function syncPosition(el){ var current = this.currentItem; $("#sync2") .find(".owl-item") .removeClass("synced") .eq(current) .addClass("synced") if($("#sync2").data("owlCarousel") !== undefined){ center(current) } } $("#sync2").on("click", ".owl-item", function(e){ e.preventDefault(); var number = $(this).data("owlItem"); sync1.trigger("owl.goTo",number); }); function center(number){ var sync2visible = sync2.data("owlCarousel").owl.visibleItems; var num = number; var found = false; for(var i in sync2visible){ if(num === sync2visible[i]){ var found = true; } } if(found===false){ if(num>sync2visible[sync2visible.length-1]){ sync2.trigger("owl.goTo", num - sync2visible.length+2) }else{ if(num - 1 === -1){ num = 0; } sync2.trigger("owl.goTo", num); } } else if(num === sync2visible[sync2visible.length-1]){ sync2.trigger("owl.goTo", sync2visible[1]) } else if(num === sync2visible[0]){ sync2.trigger("owl.goTo", num-1) } } //owl carasoul with thumbanils //tweets carasaol var owl = $("#tweets"); owl.owlCarousel( { autoPlay: 6000, //Set AutoPlay to 3 seconds pagination:false, items : 1, navigationText: [ "<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>" ], itemsDesktop : [1199,1], itemsDesktopSmall : [979,1] }); // Custom Navigation Events $(".next").click(function(){ owl.trigger('owl.next'); }) $(".prev").click(function(){ owl.trigger('owl.prev'); }) //tweets carasaol }); jQuery(function($) {'use strict'; // Navigation Scroll $(window).scroll(function(event) { Scroll(); }); $('.navbar-collapse ul li a').on('click', function() { $('html, body').animate({scrollTop: $(this.hash).offset().top - 5}, 1000); return false; }); // User define function function Scroll() { var contentTop = []; var contentBottom = []; var winTop = $(window).scrollTop(); var rangeTop = 200; var rangeBottom = 500; $('.navbar-collapse').find('.scroll a').each(function(){ contentTop.push( $( $(this).attr('href') ).offset().top); contentBottom.push( $( $(this).attr('href') ).offset().top + $( $(this).attr('href') ).height() ); }) }; $('#tohash').on('click', function(){ $('html, body').animate({scrollTop: $(this.hash).offset().top - 5}, 1000); return false; }); // accordian //Initiat WOW JS new WOW().init(); //smoothScroll //smoothScroll.init(); });
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel