home
/
zktecojo
/
public_html
/
assets
/
js
➕ New
📤 Upload
✎ Editing:
main.js
← Back
$(document).ready(function(){ /* var form = document.getElementById("sitesearchForm"); document.getElementById("searchIcon").addEventListener("click", function () { alert(1); form.submit(); }); */ $('#searchDiv').on('click',function(e){ if(!$('#search').val()) return; $('#sitesearchForm').submit(); }); $('.menu-list > li > a').on('click',function(e){ e.preventDefault(); if($(this).parent().find('ul').length>0){ return; }else{ window.location=$(this).attr('href'); } }); $('#sidebarExpand li a').on('click',function(e){ e.preventDefault(); var link=$(this).attr('href'); $('#sidebarExpand li a').removeClass('currentMenu'); $(this).addClass('currentMenu'); $.ajax({ url:link, type:'get', dataType:'html', statusCode: { 302:function(){ alert('Forbidden. Access Restricted'); }, 403:function(){ alert('Forbidden. Access Restricted','403'); }, 404:function(){ alert('Page not found','404'); }, 500:function(){ alert('Internal Server Error','500'); } } }).done(function(responseData){ scroll_to_top(); if(responseData.status=='error'){ $('.solution').html(responseData.error); }else{ $('.solution').html(responseData); } }).error(function(jqXHR,textStatus){ }); }); function scroll_to_top(){ $('html,body').animate({ scrollTop:0 },1300); } //#main-slider $(function(){ $('#main-slider').carousel({ interval: 2000 }); }); $(document).ready(function() { $("#main-slider").swiperight(function() { $(this).carousel('prev'); }); $("#main-slider").swipeleft(function() { $(this).carousel('next'); }); }); $(document).ready(function () { $('#gallery-scroll').owlCarousel({ loop:true, margin:10, pagination:false, responsiveClass:true, autoHeight : true, singleItem:true, items:1, nav:true, navigation :true, navigationText : ["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"], animateOut: 'fadeOutUp', animateIn: 'faseInDown' }) }); // goto id // TIME LINE $.daisyNav(); //wow.js init wow = new WOW( { animateClass: 'animated', mobile: false, offset: 100 } ); wow.init(); // slick carasoul $("#fngNews").owlCarousel({ // autoPlay: 3000, autoPlay: true, autoWidth:true, items : 3, navigation :true, navigationText : ["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"], pagination :false, itemsDesktop : [1199,3], itemsDesktopSmall : [979,3] }); }); //floting social media //$(document).ready(function(){ jQuery(document).ready(function($) { $('.socialMediaWrap').addFloating( { targetRight: 0, targetTop: 100, snap: true }); }); /* $("#search").click(function(){ $(".has-feedback").toggleClass("has-feedback-clicked"); //$("#menu_icon").toggleClass("close_menu"); return false; }); */ // sidebar expand $("#sidebarExpand").navgoco({ caretHtml: '', accordion: false, openClass: 'open', save: true, cookie: { name: 'navgoco', expires: false, path: '/' }, slide: { duration: 400, easing: 'swing' }, // Add Active class to clicked menu item onClickAfter: function(e, submenu) { e.preventDefault(); $('#sidebar').find('li').removeClass('active'); var li = $(this).parent(); var lis = li.parents('li'); li.addClass('active'); lis.addClass('active'); }, }); // sidebar expand var ww = $(window).width(); if(ww >1030){ var headerHeight=$('.navbar').height(); $('#sideBarBlock').stickit({ // Sets the element stick in the parent element or entire document. scope: StickScope.Parent, // Sets the class name to the element when it's stick. className: 'stickit', // Sets sticky top, eg. it will be stuck at position top 50 if you set 50. top: headerHeight+1, // Sets extra height for parent element, it could be used only StickScope.Parent. When the contents of parent has margin or something let the actual height out of container, you could use this options to fix. extraHeight: 0 }); } if(ww > 768){ $(function(){ var shrinkHeader = 250; $(window).scroll(function() { var scroll = getCurrentScroll(); if ( scroll >= shrinkHeader ) { $('.header').addClass('shrink'); } else { $('.header').removeClass('shrink'); } }); function getCurrentScroll() { return window.pageYOffset || document.documentElement.scrollTop; } }); } //FANCY BOX $(".fancybox").fancybox(); $(".various").fancybox({ maxWidth : 700, maxHeight : 750, fitToView : false, width : '90%', height : '90%', autoSize : false, closeClick : false, openEffect : 'none', closeEffect : 'none' }); $( ".heading" ).on('click',function() { //$(this).find('span').removeClass('cartIcon').addClass('minusIcon'); $(this).next('.expand').slideToggle('300'); $("span",this).toggleClass("icon-circle-arrow-up"); }); $("#contactForm").validate({ rules: { name: "required", companyName: "required", fmsg: "required", phone: { required: true, number: true }, email: { required: true, email: true }, }, messages: { htl_name: "Please enter your firstname", lastname: "Please enter your lastname", username: { required: "Please enter a username", minlength: "Your username must consist of at least 2 characters" }, password: { required: "Please provide a password", minlength: "Your password must be at least 5 characters long" }, confirm_password: { required: "Please provide a password", minlength: "Your password must be at least 5 characters long", equalTo: "Please enter the same password as above" }, email: "Please enter a valid email address", agree: "Please accept our policy" } }); $("#contact_online_form").validate({ rules: { name: "required", prdct_model_no: "required", companyName: "required", fmsg: "required", phone: { required: true, number: true }, email: { required: true, email: true }, }, messages: { htl_name: "Please enter your firstname", lastname: "Please enter your lastname", username: { required: "Please enter a username", minlength: "Your username must consist of at least 2 characters" }, password: { required: "Please provide a password", minlength: "Your password must be at least 5 characters long" }, confirm_password: { required: "Please provide a password", minlength: "Your password must be at least 5 characters long", equalTo: "Please enter the same password as above" }, email: "Please enter a valid email address", agree: "Please accept our policy" } });
💾 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