jQuery(document).ready(function() { "use strict"; /******************************* OPEN COMMENT BOX ONCE ON CLICK ********************************/ jQuery("#feedback-form").on("click",function() { jQuery("#comment-form").slideDown( "slow" ); jQuery("#feedback-form").hide(); return false; }); /****** MOBILE NAV ********/ jQuery('.navbar-header i.navbar-toggle').on("click",function(e) { jQuery('.mobile-menu-holder').slideToggle('slow', function() { jQuery('.mobile-menu-holder').toggleClass('open-mobile-menu', jQuery(this).is(':visible')); }); e.preventDefault(); }); /****** MOBILE MENU ********/ jQuery('.mobile-menu-holder ul > li.menu-item-has-children').on('click', function(e) { e.stopPropagation(); if( jQuery(this).children('i.mobile_menu_arrow').first().hasClass( "fa fa-caret-down" ) ) { jQuery(this).children('i.mobile_menu_arrow').first().removeClass('fa fa-caret-down'); jQuery(this).children('i.mobile_menu_arrow').first().addClass('fa fa-caret-up'); } else { jQuery(this).children('i.mobile_menu_arrow').first().removeClass('fa fa-caret-up'); jQuery(this).children('i.mobile_menu_arrow').first().addClass('fa fa-caret-down'); } if( jQuery(this).children('a').children('i').first().hasClass( 'fa fa-angle-up' ) ) { jQuery(this).children('a').children('i').first().removeClass('fa fa-angle-up'); jQuery(this).children('a').children('i').first().addClass('fa fa-angle-right'); } else { jQuery(this).children('a').children('i').first().removeClass('fa fa-angle-right'); jQuery(this).children('a').children('i').first().addClass('fa fa-angle-up'); } jQuery(this).find('ul').first().slideToggle(); }); /****** ICON SEARCH ********/ jQuery('#page-open-popup-search, #new-page-open-popup-search').on('click', function(e) { jQuery(".icon-page-popup.page-search-popup").addClass('open'); jQuery("#jquery-live-search").css("z-index", "999999"); return false; }); jQuery('#manual-icon-search-popup-close').on('click', function(e) { jQuery(".icon-page-popup.page-search-popup").removeClass('open'); jQuery("#jquery-live-search").css("z-index", "99"); return true; }); /****** TREE VIEW KB ********/ jQuery(".kb_tree_viewmenu").each(function(e){ if( jQuery( ".kb_tree_viewmenu li.root_cat a" ).hasClass( "open-ul-first" ) ){ var current_post_ID = jQuery( ".kb_tree_viewmenu li.root_cat a.open-ul-first" ).attr("rel"); jQuery(".kb_tree_viewmenu li.root_cat a.open-ul-first").addClass('dataicon child-a-icon-'+current_post_ID); jQuery('.kb_tree_viewmenu').find("ul.kb-tree-records-"+current_post_ID).addClass('child-open-'+current_post_ID).slideDown(300); jQuery('.kb_tree_viewmenu').find("ul.kb-tree-chidcat-"+current_post_ID).addClass('child-open-'+current_post_ID).slideDown(300); } }); jQuery('.kb_tree_viewmenu a.kb-tree-recdisplay').on('click', function(e){ var current_post_ID = jQuery(this).attr("rel"); if( current_post_ID != '' ) { var current_ul_status = jQuery(this).parents(".kb_tree_viewmenu").find("ul.kb-tree-records-"+current_post_ID).is(':hidden'); if ( 0 < jQuery(this).next("ul").size() ) { e.preventDefault(); } if( current_ul_status == true ) { jQuery(this).parents(".kb_tree_viewmenu").find("li.root_cat > ul.kbroot_cat_records").slideUp(300); jQuery(this).parents(".kb_tree_viewmenu").find("li.root_cat ul.tree_child_records ").slideUp(300); jQuery(this).parents(".kb_tree_viewmenu").find("a.kb-tree-recdisplay").removeClass('dataicon'); jQuery(this).parents(".kb_tree_viewmenu").find("ul.kb-tree-records-"+current_post_ID).slideDown(300); jQuery(this).parents(".kb_tree_viewmenu").find("ul.kb-tree-chidcat-"+current_post_ID).slideDown(300); jQuery(this).addClass('dataicon child-a-icon-'+current_post_ID); jQuery(this).parents(".kb_tree_viewmenu").find("ul.kb-tree-records-"+current_post_ID).addClass('child-open-'+current_post_ID); } else if( jQuery(this).parents(".kb_tree_viewmenu").find('ul').hasClass('child-open-'+current_post_ID) ) { jQuery(this).parents(".kb_tree_viewmenu").find("ul.child-open-"+current_post_ID).not(":hidden").slideUp(300); jQuery(this).parents(".kb_tree_viewmenu").find('ul').removeClass('child-open-'+current_post_ID); jQuery(this).parents(".kb_tree_viewmenu").find("a.child-a-icon-"+current_post_ID).removeClass('dataicon'); jQuery(this).parents(".kb_tree_viewmenu").find("a.child-a-icon-"+current_post_ID).removeClass('child-a-icon-'+current_post_ID); jQuery(this).parents(".kb_tree_viewmenu").find("ul.kb-tree-chidcat-"+current_post_ID).slideUp(300); } } }); /************* HAMBURGER MENU **************/ jQuery('.hamburger-menu').on('click', function(e) { if (jQuery(".hamburger-menu").hasClass("menu-open")) { jQuery('.hamburger-menu').removeClass( "menu-open" ); jQuery('ul.nav.navbar-nav').hide(); jQuery('.form-group.menu-bar-form').show(); jQuery('.form-group.menu-bar-form.add-on-widgets').hide(); jQuery('.theme_header_menu_social').hide(); jQuery(window).trigger("resize"); } else { jQuery('.hamburger-menu').addClass( "menu-open" ); jQuery('ul.nav.navbar-nav').show(); jQuery('.form-group.menu-bar-form').hide(); jQuery('.form-group.menu-bar-form.add-on-widgets').show(); jQuery('.theme_header_menu_social').show(); jQuery(window).trigger("resize"); } }); /*********************** INLINE DOC PROGRESS BAR ************************/ jQuery(window).scroll(function() { if (jQuery('div').hasClass('inlinedocs-sidebar')) { var t = jQuery(this).scrollTop(), n = jQuery(this).innerHeight(), e = jQuery(".inlinedocs-sidebar li a").filter(".active").index(); jQuery(".ininebody").each(function(i) { var c = jQuery(this).offset().top, s = jQuery(this).height(), a = c + s, r = 0; t >= c && t <= a ? (r = (t - c) / s * 100) >= 100 && (r = 100) : t > a && (r = 100), a < t + n - 70 && (r = 100); var d = jQuery(".inlinedocs-sidebar ul.nav .inline-progress-bar:eq(" + i + ")"); e > i && d.parent().addClass("viewed"), d.css("width", r + "%") }) } }); /******************** FAQ COLLAPSIBLE PANEL ********************/ if ( faq_search_id != '' ){ jQuery('.collapsible-panels div').hide(); jQuery('#'+faq_search_id ).addClass( "active" ); jQuery(".display-faq-section .entry-content-"+faq_search_id+"").slideDown(300).show(); } else { jQuery('.collapsible-panels div').hide(); } jQuery('.collapsible-panels.theme-faq-cat-pg').on("click",function(e) { var current_post_ID = jQuery(this).attr("id"); if( jQuery(".display-faq-section div.faq-catpg-"+current_post_ID+", .knowledgebase-cat-body div.faq-catpg-"+current_post_ID+"").hasClass('active') ) { jQuery(".display-faq-section div.theme-faq-cat-pg, .knowledgebase-cat-body div.theme-faq-cat-pg").removeClass('active'); jQuery(".entry-content-"+current_post_ID+"").slideUp(300).show(); } else { jQuery(".display-faq-section .entry-content-faq-all").slideUp(300); jQuery(".display-faq-section div.theme-faq-cat-pg, .knowledgebase-cat-body div.theme-faq-cat-pg").removeClass('active'); jQuery(".display-faq-section .entry-content-"+current_post_ID+"").slideDown(300).show(); jQuery(".display-faq-section div.faq-catpg-"+current_post_ID+", .knowledgebase-cat-body div.faq-catpg-"+current_post_ID+"").addClass('active'); } e.preventDefault(); }); jQuery('#faq-expandall').on("click",function() { jQuery(".display-faq-section .entry-content-faq-all").slideToggle(300).show(); jQuery(".display-faq-section .theme-faq-cat-pg").toggleClass('active'); }); /******************** FAQ - LOAD MORE ********************/ jQuery('.faq_ajax_load_prev, .faq_ajax_load_next').on('click', function(e){ jQuery("#ajax-load-faq-container").html("
"); var current_case = jQuery(this).attr("rel"); var page_break = jQuery('#faq_load_more_total_page').val(); var current_page = jQuery('#faq_load_more_current_page').val(); var query_terms = jQuery('#faq_load_more_slug_name').val(); if( current_case == 2 ) { var new_current_page = parseInt(current_page) + parseInt(1); } else { if( current_page > 1 ) { var new_current_page = parseInt(current_page) - parseInt(1); } } // Ajax call jQuery.ajax({ type: "post", url: doc_ajax_var.url, data: { action: 'manual__faq_catpg_load_posts', nonce: doc_ajax_var.nonce, total_page_break: page_break, current_display_page: new_current_page, terms: query_terms, }, success: function(data, textStatus, XMLHttpRequest){ jQuery("#ajax-load-faq-container").html(data); jQuery('#faq_load_more_current_page').attr('value', new_current_page); jQuery('#faq_load_more_current_pg_no').text(new_current_page); if (new_current_page >= page_break) { jQuery('.faq_ajax_load_next').hide(); } else { jQuery('.faq_ajax_load_next').show(); } jQuery( document ).trigger( "manual_faq_show_hide_callback", { } ); }, error: function(MLHttpRequest, textStatus, errorThrown){ } }); return false; }); /*************** TRENDING SEARCH ****************/ jQuery('.trending-search a.trending-search-popular-keyword').on('click', function(e){ var current_text = jQuery(this).text(); jQuery('#s').val(current_text).focus(); return false; }); jQuery( ".form-group input.header-search" ).mousedown(function() { jQuery('.form-group input.header-search').attr('placeholder',manual_searchmsg); }); jQuery( ".form-group input.header-search" ).focusout(function() { var old_place_holder = jQuery( "#oldplacvalue" ).val(); jQuery('.form-group input.header-search').attr('placeholder', old_place_holder); }); /************************* ON SCROLL STICKY MENU BAR **************************/ if( sticky_menu == 2 ) { jQuery(window).on("scroll",function() { var $mainClass = jQuery(".navbar"), $body = jQuery("body"); var $original_html_height = jQuery( document ).height(); if ((jQuery("html nav").hasClass("navbar"))){ if ((jQuery(window).scrollTop() > 25)&& (jQuery(window).width()>=1100) ) { // Active if($mainClass.hasClass("after-scroll-wrap")) return false; $body.addClass("search-active-sticky").css("padding-top", 1); $mainClass.addClass("after-scroll-wrap"); jQuery(window).trigger("resize").trigger("scroll"); } else { if($body.hasClass("search-active-sticky")) { $body.removeClass("search-active-sticky").css("padding-top", 0); $mainClass.removeClass("after-scroll-wrap"); jQuery(window).trigger("resize").trigger("scroll"); } } } }); } /********** VIDEO PLAY **********/ jQuery('.manual_vc_video_image_effect_tag_a').magnificPopup({ disableOn: 700, type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false }); /************** WOO PLUS/MINUS ***************/ jQuery('.quantity.woo-add-plus-minus').on('click', '.plus', function(e) { var input = jQuery(this).prev('input.qty'); var val = parseInt(input.val()); input.val( val+1 ).change(); }); jQuery('.quantity.woo-add-plus-minus').on('click', '.minus', function(e) { var input = jQuery(this).next('input.qty'); var val = parseInt(input.val()); if (val > 0) { input.val( val-1 ).change(); } }); /************************ GLOBAL :: SCROLL PAGE UP *************************/ if ( (jQuery(window).width()>=767) ) { jQuery("#scrollbkToTop").hide(); jQuery( "body" ).append( "" ); jQuery(function () { jQuery(window).on("scroll",function() { if (jQuery(this).scrollTop() > 150) { jQuery('#scrollbkToTop').fadeIn(); } else { jQuery('#scrollbkToTop').fadeOut(); } }); jQuery('#scrollbkToTop a').on("click",function() { jQuery('body,html').animate({ scrollTop: 0 }, 800); return false; }); }); } /************************** DOCUMENTATION :: SHOW/HIDE ***************************/ jQuery('#list-manual > li > a.has-child i, #list-manual li a.has-inner-child i').on('click', function(e){ e.preventDefault(); }); jQuery('#list-manual > li > a.has-child').on('click', function(e){ var current_post_ID = jQuery(this).attr("rel"); if( doc_disable_ajaxload == 1 ) { if ( 0 < jQuery(this).next("ul").size() ) { e.preventDefault(); } } if ( 0 == jQuery(this).next("ul").size() || 0 == jQuery(this).next("ul:hidden").size() ) { return; } jQuery(this).parents("#list-manual").find("li > a").removeClass('dataicon'); jQuery(this).parents("#list-manual").find("ul").not(":hidden").slideUp(300); jQuery(this).addClass('dataicon').next("ul").slideDown(300); }); jQuery('#list-manual li a.has-inner-child').on('click', function(e){ var current_post_ID = jQuery(this).attr("rel"); var current_ul_status = jQuery(this).parents("#list-manual").find("ul.child-open-"+current_post_ID).is(':hidden'); if( doc_disable_ajaxload == 1 ) { if ( 0 < jQuery(this).next("ul").size() ) { e.preventDefault(); } } if( current_ul_status == true ) { jQuery(this).next("ul").slideDown(300); } else if( jQuery(this).parents("#list-manual").find('ul').hasClass('child-open-'+current_post_ID) ) { jQuery(this).parents("#list-manual").find("ul.child-open-"+current_post_ID).not(":hidden").slideUp(300); jQuery(this).parents("#list-manual").find('ul').removeClass('child-open-'+current_post_ID); jQuery(this).parents("#list-manual").find("li > a.child-a-icon-"+current_post_ID+" > i").removeClass('fa-minus-circle'); jQuery(this).parents("#list-manual").find("li > a.child-a-icon-"+current_post_ID+" > i").addClass('fa-plus-circle'); jQuery(this).parents("#list-manual").find("li > a.child-a-icon-"+current_post_ID).removeClass('dataicon'); jQuery(this).parents("#list-manual").find("li > a.child-a-icon-"+current_post_ID).removeClass('child-a-icon-'+current_post_ID); } else { jQuery(this).addClass('dataicon child-a-icon-'+current_post_ID).next("ul").addClass('child-open-'+current_post_ID).slideDown(300); jQuery(this).find("a.has-inner-child > i").removeClass('fa-plus-circle'); jQuery(this).find("a.has-inner-child > i").addClass('fa-minus-circle'); } }); jQuery('#list-manual > li > a.no-child').on('click', function(e){ jQuery(this).parents("#list-manual").find("li > a").removeClass('dataicon'); jQuery(this).parents("#list-manual").find("ul").not(":hidden").slideUp(300); }); jQuery("#list-manual").each(function(e){ if( jQuery( "#list-manual > li > a" ).hasClass( "open-ul-first" ) ){ jQuery( "#list-manual > li > a.open-ul-first" ).addClass('dataicon').next("ul").slideDown(300); } if( manual_expand_doc_treemenu_default == 2 ) { jQuery("#list-manual li a").addClass('dataicon'); jQuery(".doc-expandall").hide(); jQuery(".doc-collapseall").show(); jQuery("#list-manual li").children('ul').slideDown(300); } }); jQuery('.doc-expandall').on('click', function(e){ jQuery("#list-manual li a").addClass('dataicon'); jQuery(".doc-expandall").hide(); jQuery(".doc-collapseall").show(); jQuery("#list-manual li").children('ul').slideDown(300); }); jQuery('.doc-collapseall').on('click', function(e){ jQuery("#list-manual li a").removeClass('dataicon'); jQuery(".doc-collapseall").hide(); jQuery(".doc-expandall").show(); jQuery("#list-manual li").children('ul').slideUp(300); }); /**************************************** DOCUMENTATION :: DISPLAY SELECTED ARTICLE *****************************************/ window.onload = manual__direct_doc_artilceload_default(); if( global_ajaxload_shortcode == 1 ) { // Only on page :: shortcode fix window.onload = manual__direct_doc_artilceload_ajax(); } else { if( doc_disable_ajaxload == 1 ) { window.onload = manual__direct_doc_artilceload_ajax(); } } window.onload = manual__direct_doc_artilceload_open_close(); function manual__direct_doc_artilceload_default(){ // Doc Normal page load if( jQuery( "#list-manual.doc_ul_normal li > a" ).hasClass( "doc-active" ) ){ // Auto scroll if found any target # while visiting direct URL. var hash = ''; var pageURL = jQuery(location).attr("href"); var type = pageURL.split('#'); if(type.length > 1) hash = '#'+type[1]; if( hash != '' ) jQuery('html,body').animate({ scrollTop: jQuery(hash).offset().top-100 }, 2000); // Display correct URL at the top, for the first doc page visit. var current_post_ID = jQuery("#list-manual.doc_ul_normal li > a.doc-active").attr('rel'); var current_href = jQuery("#list-manual.doc_ul_normal li > a.doc-active").attr("href"); History.pushState({id:jQuery("#list-manual.doc_ul_normal li > a.doc-active").attr("rel")},jQuery("#list-manual.doc_ul_normal li > a.doc-active").text(), current_href); } } function manual__direct_doc_artilceload_ajax(){ // call ajax if( jQuery( "#list-manual li > a" ).hasClass( "doc-active" ) ){ var current_post_ID = jQuery("#list-manual li > a.doc-active").attr('rel'); if( doc_disable_ajaxload == 1 && doc_ajaxload_autoscroll == 1 ) { jQuery('html,body').animate({ scrollTop: jQuery('.doc-single-post').offset().top-100 }, 2000); } /*** Current Page HREF ***/ var current_href = jQuery("#list-manual li > a.doc-active").attr("href"); History.pushState({id:jQuery("#list-manual li > a.doc-active").attr("rel")},jQuery("#list-manual li > a.doc-active").text(), current_href); /*** Eof Current Page HREF ***/ jQuery("#single-post-container").html("