1jQuery(document).ready(function() { 2 3 "use strict"; 4 5 /******************************* 6 OPEN COMMENT BOX ONCE ON CLICK 7 ********************************/ 8 jQuery("#feedback-form").on("click",function() { 9 jQuery("#comment-form").slideDown( "slow" ); 10 jQuery("#feedback-form").hide(); 11 return false; 12 }); 13 14 /****** 15 MOBILE NAV 16 ********/ 17 jQuery('.navbar-header i.navbar-toggle').on("click",function(e) { 18 jQuery('.mobile-menu-holder').slideToggle('slow', function() { 19 jQuery('.mobile-menu-holder').toggleClass('open-mobile-menu', jQuery(this).is(':visible')); 20 }); 21 e.preventDefault(); 22 }); 23 24 /****** 25 MOBILE MENU 26 ********/ 27 jQuery('.mobile-menu-holder ul > li.menu-item-has-children').on('click', function(e) { 28 e.stopPropagation(); 29 if( jQuery(this).children('i.mobile_menu_arrow').first().hasClass( "fa fa-caret-down" ) ) { 30 jQuery(this).children('i.mobile_menu_arrow').first().removeClass('fa fa-caret-down'); 31 jQuery(this).children('i.mobile_menu_arrow').first().addClass('fa fa-caret-up'); 32 } else { 33 jQuery(this).children('i.mobile_menu_arrow').first().removeClass('fa fa-caret-up'); 34 jQuery(this).children('i.mobile_menu_arrow').first().addClass('fa fa-caret-down'); 35 } 36 37 if( jQuery(this).children('a').children('i').first().hasClass( 'fa fa-angle-up' ) ) { 38 jQuery(this).children('a').children('i').first().removeClass('fa fa-angle-up'); 39 jQuery(this).children('a').children('i').first().addClass('fa fa-angle-right'); 40 } else { 41 jQuery(this).children('a').children('i').first().removeClass('fa fa-angle-right'); 42 jQuery(this).children('a').children('i').first().addClass('fa fa-angle-up'); 43 } 44 jQuery(this).find('ul').first().slideToggle(); 45 }); 46 47 /****** 48 ICON SEARCH 49 ********/ 50 jQuery('#page-open-popup-search, #new-page-open-popup-search').on('click', function(e) { 51 jQuery(".icon-page-popup.page-search-popup").addClass('open'); 52 jQuery("#jquery-live-search").css("z-index", "999999"); 53 return false; 54 }); 55 jQuery('#manual-icon-search-popup-close').on('click', function(e) { 56 jQuery(".icon-page-popup.page-search-popup").removeClass('open'); 57 jQuery("#jquery-live-search").css("z-index", "99"); 58 return true; 59 }); 60 61 /****** 62 TREE VIEW KB 63 ********/ 64 jQuery(".kb_tree_viewmenu").each(function(e){ 65 if( jQuery( ".kb_tree_viewmenu li.root_cat a" ).hasClass( "open-ul-first" ) ){ 66 var current_post_ID = jQuery( ".kb_tree_viewmenu li.root_cat a.open-ul-first" ).attr("rel"); 67 jQuery(".kb_tree_viewmenu li.root_cat a.open-ul-first").addClass('dataicon child-a-icon-'+current_post_ID); 68 jQuery('.kb_tree_viewmenu').find("ul.kb-tree-records-"+current_post_ID).addClass('child-open-'+current_post_ID).slideDown(300); 69 jQuery('.kb_tree_viewmenu').find("ul.kb-tree-chidcat-"+current_post_ID).addClass('child-open-'+current_post_ID).slideDown(300); 70 } 71 }); 72 73 jQuery('.kb_tree_viewmenu a.kb-tree-recdisplay').on('click', function(e){ 74 var current_post_ID = jQuery(this).attr("rel"); 75 if( current_post_ID != '' ) { 76 var current_ul_status = jQuery(this).parents(".kb_tree_viewmenu").find("ul.kb-tree-records-"+current_post_ID).is(':hidden'); 77 if ( 0 < jQuery(this).next("ul").size() ) { 78 e.preventDefault(); 79 } 80 if( current_ul_status == true ) { 81 jQuery(this).parents(".kb_tree_viewmenu").find("li.root_cat > ul.kbroot_cat_records").slideUp(300); 82 jQuery(this).parents(".kb_tree_viewmenu").find("li.root_cat ul.tree_child_records ").slideUp(300); 83 jQuery(this).parents(".kb_tree_viewmenu").find("a.kb-tree-recdisplay").removeClass('dataicon'); 84 jQuery(this).parents(".kb_tree_viewmenu").find("ul.kb-tree-records-"+current_post_ID).slideDown(300); 85 jQuery(this).parents(".kb_tree_viewmenu").find("ul.kb-tree-chidcat-"+current_post_ID).slideDown(300); 86 jQuery(this).addClass('dataicon child-a-icon-'+current_post_ID); 87 jQuery(this).parents(".kb_tree_viewmenu").find("ul.kb-tree-records-"+current_post_ID).addClass('child-open-'+current_post_ID); 88 } else if( jQuery(this).parents(".kb_tree_viewmenu").find('ul').hasClass('child-open-'+current_post_ID) ) { 89 jQuery(this).parents(".kb_tree_viewmenu").find("ul.child-open-"+current_post_ID).not(":hidden").slide
89Up(300); 90 jQuery(this).parents(".kb_tree_viewmenu").find('ul').removeClass('child-open-'+current_post_ID); 91 jQuery(this).parents(".kb_tree_viewmenu").find("a.child-a-icon-"+current_post_ID).removeClass('dataicon'); 92 jQuery(this).parents(".kb_tree_viewmenu").find("a.child-a-icon-"+current_post_ID).removeClass('child-a-icon-'+current_post_ID); 93 jQuery(this).parents(".kb_tree_viewmenu").find("ul.kb-tree-chidcat-"+current_post_ID).slideUp(300); 94 } 95 } 96 }); 97 98 /************* 99 HAMBURGER MENU 100 **************/ 101 jQuery('.hamburger-menu').on('click', function(e) { 102 if (jQuery(".hamburger-menu").hasClass("menu-open")) { 103 jQuery('.hamburger-menu').removeClass( "menu-open" ); 104 jQuery('ul.nav.navbar-nav').hide(); 105 jQuery('.form-group.menu-bar-form').show(); 106 jQuery('.form-group.menu-bar-form.add-on-widgets').hide(); 107 jQuery('.theme_header_menu_social').hide(); 108 jQuery(window).trigger("resize"); 109 } else { 110 jQuery('.hamburger-menu').addClass( "menu-open" ); 111 jQuery('ul.nav.navbar-nav').show(); 112 jQuery('.form-group.menu-bar-form').hide(); 113 jQuery('.form-group.menu-bar-form.add-on-widgets').show(); 114 jQuery('.theme_header_menu_social').show(); 115 jQuery(window).trigger("resize"); 116 } 117 }); 118 119 /*********************** 120 INLINE DOC PROGRESS BAR 121 ************************/ 122 jQuery(window).scroll(function() { 123 if (jQuery('div').hasClass('inlinedocs-sidebar')) { 124 var t = jQuery(this).scrollTop(), 125 n = jQuery(this).innerHeight(), 126 e = jQuery(".inlinedocs-sidebar li a").filter(".active").index(); 127 jQuery(".ininebody").each(function(i) { 128 var c = jQuery(this).offset().top, 129 s = jQuery(this).height(), 130 a = c + s, 131 r = 0; 132 t >= c && t <= a ? (r = (t - c) / s * 100) >= 100 && (r = 100) : t > a && (r = 100), a < t + n - 70 && (r = 100); 133 var d = jQuery(".inlinedocs-sidebar ul.nav .inline-progress-bar:eq(" + i + ")"); 134 e > i && d.parent().addClass("viewed"), d.css("width", r + "%") 135 }) 136 } 137 }); 138 139 /******************** 140 FAQ COLLAPSIBLE PANEL 141 ********************/ 142 if ( faq_search_id != '' ){ 143 jQuery('.collapsible-panels div').hide(); 144 jQuery('#'+faq_search_id ).addClass( "active" ); 145 jQuery(".display-faq-section .entry-content-"+faq_search_id+"").slideDown(300).show(); 146 } else { 147 jQuery('.collapsible-panels div').hide(); 148 } 149 jQuery('.collapsible-panels.theme-faq-cat-pg').on("click",function(e) { 150 var current_post_ID = jQuery(this).attr("id"); 151 if( jQuery(".display-faq-section div.faq-catpg-"+current_post_ID+", .knowledgebase-cat-body div.faq-catpg-"+current_post_ID+"").hasClass('active') ) { 152 jQuery(".display-faq-section div.theme-faq-cat-pg, .knowledgebase-cat-body div.theme-faq-cat-pg").removeClass('active'); 153 jQuery(".entry-content-"+current_post_ID+"").slideUp(300).show(); 154 } else { 155 jQuery(".display-faq-section .entry-content-faq-all").slideUp(300); 156 jQuery(".display-faq-section div.theme-faq-cat-pg, .knowledgebase-cat-body div.theme-faq-cat-pg").removeClass('active'); 157 jQuery(".display-faq-section .entry-content-"+current_post_ID+"").slideDown(300).show(); 158 jQuery(".display-faq-section div.faq-catpg-"+current_post_ID+", .knowledgebase-cat-body div.faq-catpg-"+current_post_ID+"").addClass('active'); 159 } 160 e.preventDefault(); 161 }); 162 jQuery('#faq-expandall').on("click",function() { 163 jQuery(".display-faq-section .entry-content-faq-all").slideToggle(300).show(); 164 jQuery(".display-faq-section .theme-faq-cat-pg").toggleClass('active'); 165 }); 166 167 /*************** 168 TRENDING SEARCH 169 ****************/ 170 jQuery('.trending-search a.trending-search-popular-keyword').on('click', function(e){ 171 var current_text = jQuery(this).text(); 172 jQuery('#s').val(current_text).focus(); 173 return false; 174 }); 175 jQuery( ".form-group input.header-search" ).mousedown(function() { 176 jQuery('.form-group input.header-search').attr('placeholder',manual_searchmsg); 177 }); 178 jQuery( ".form-group input.header-search" ).focusout(function() { 179 var old_place_holder = jQuery( "#oldplacvalue" ).val(); 180 jQuery('.form-group input.header-search').attr('placeholder', old_place_holder); 181 }); 182 183 /************************* 184 ON SCROLL STICKY MENU BAR 185 **************************/ 186 if( sticky_menu == 2 ) { 187 jQuery(window).on("scroll",function() { 188 var $mainClass = jQuery(".navbar"), $body = jQuery("body"); 189 var $original_html_height = jQuery( document ).height(); 190 if ((jQuery("html nav").hasClass("navbar"))){ 191 if ((jQuery(window).scrollTop() > 25)&& (jQuery(window).width()>=1100) ) { 192 // Active 193 if($mainClass.hasClass("after-scroll-wrap")) 194 return false; 195 196 $body.addClass("search-active-sticky").css("padding-top", 1); 197 $mainClass.addClass("after-scroll-wrap"); 198 jQuery(window).trigger("resize").trigger("scroll"); 199 } else { 200 if($body.hasClass("search-active-sticky")) { 201 $body.removeClass("search-active-sticky").css("padding-top", 0); 202 $mainClass.removeClass("after-scroll-wrap"); 203 jQuery(window).trigger("resize").trigger("scroll"); 204 } 205 } 206 } 207 }); 208 } 209 210 /********** 211 VIDEO PLAY 212 **********/ 213 jQuery('.manual_vc_video_image_effect_tag_a').magnificPopup({ 214 disableOn: 700, 215 type: 'iframe', 216 mainClass: 'mfp-fade', 217 removalDelay: 160, 218 preloader: false,
219 fixedContentPos: false 220 }); 221 222 /************** 223 WOO PLUS/MINUS 224 ***************/ 225 jQuery('.quantity.woo-add-plus-minus').on('click', '.plus', function(e) { 226 var input = jQuery(this).prev('input.qty'); 227 var val = parseInt(input.val()); 228 input.val( val+1 ).change(); 229 }); 230 jQuery('.quantity.woo-add-plus-minus').on('click', '.minus', 231 function(e) { 232 var input = jQuery(this).next('input.qty'); 233 var val = parseInt(input.val()); 234 if (val > 0) { 235 input.val( val-1 ).change(); 236 } 237 }); 238 239 /************************ 240 GLOBAL :: SCROLL PAGE UP 241 *************************/ 242 if ( (jQuery(window).width()>=767) ) { 243 jQuery("#scrollbkToTop").hide(); 244 jQuery( "body" ).append( "<p id=\"scrollbkToTop\" style=\"display: none;\"><a href=\"#top\"><span> <i class=\'"+go_up_icon+" footer-go-uplink\'></i></span></a></p>" ); 245 jQuery(function () { 246 jQuery(window).on("scroll",function() { 247 if (jQuery(this).scrollTop() > 150) { 248 jQuery('#scrollbkToTop').fadeIn(); 249 } else { 250 jQuery('#scrollbkToTop').fadeOut(); 251 } 252 }); 253 jQuery('#scrollbkToTop a').on("click",function() { 254 jQuery('body,html').animate({ 255 scrollTop: 0 256 }, 800); 257 return false; 258 }); 259 }); 260 } 261 262 /************************** 263 DOCUMENTATION :: SHOW/HIDE 264 ***************************/ 265 jQuery('#list-manual > li > a.has-child i, #list-manual li a.has-inner-child i').on('click', function(e){ 266 e.preventDefault(); 267 }); 268 jQuery('#list-manual > li > a.has-child').on('click', function(e){ 269 var current_post_ID = jQuery(this).attr("rel"); 270 if( doc_disable_ajaxload == 1 ) { 271 if ( 0 < jQuery(this).next("ul").size() ) { 272 e.preventDefault(); 273 } 274 } 275 if ( 0 == jQuery(this).next("ul").size() || 0 == jQuery(this).next("ul:hidden").size() ) { 276 return; 277 } 278 jQuery(this).parents("#list-manual").find("li > a").removeClass('dataicon'); 279 jQuery(this).parents("#list-manual").find("ul").not(":hidden").slideUp(300); 280 jQuery(this).addClass('dataicon').next("ul").slideDown(300); 281 }); 282 jQuery('#list-manual li a.has-inner-child').on('click', function(e){ 283 var current_post_ID = jQuery(this).attr("rel"); 284 var current_ul_status = jQuery(this).parents("#list-manual").find("ul.child-open-"+current_post_ID).is(':hidden'); 285 if( doc_disable_ajaxload == 1 ) { 286 if ( 0 < jQuery(this).next("ul").size() ) { 287 e.preventDefault(); 288 } 289 } 290 if( current_ul_status == true ) { 291 jQuery(this).next("ul").slideDown(300); 292 } else if( jQuery(this).parents("#list-manual").find('ul').hasClass('child-open-'+current_post_ID) ) { 293 jQuery(this).parents("#list-manual").find("ul.child-open-"+current_post_ID).not(":hidden").slideUp(300); 294 jQuery(this).parents("#list-manual").find('ul').removeClass('child-open-'+current_post_ID); 295 jQuery(this).parents("#list-manual").find("li > a.child-a-icon-"+current_post_ID+" > i").removeClass('fa-minus-circle'); 296 jQuery(this).parents("#list-manual").find("li > a.child-a-icon-"+current_post_ID+" > i").addClass('fa-plus-circle'); 297 jQuery(this).parents("#list-manual").find("li > a.child-a-icon-"+current_post_ID).removeClass('dataicon'); 298 jQuery(this).parents("#list-manual").find("li > a.child-a-icon-"+current_post_ID).removeClass('child-a-icon-'+current_post_ID); 299 } else { 300 jQuery(this).addClass('dataicon child-a-icon-'+current_post_ID).next("ul").addClass('child-open-'+current_post_ID).slideDown(300); 301 jQuery(this).find("a.has-inner-child > i").removeClass('fa-plus-circle'); 302 jQuery(this).find("a.has-inner-child > i").addClass('fa-minus-circle'); 303 } 304 }); 305 jQuery('#list-manual > li > a.no-child').on('click', function(e){ 306 jQuery(this).parents("#list-manual").find("li > a").removeClass('dataicon'); 307 jQuery(this).parents("#list-manual").find("ul").not(":hidden").slideUp(300); 308 }); 309 jQuery("#list-manual").each(function(e){ 310 if( jQuery( "#list-manual > li > a" ).hasClass( "open-ul-first" ) ){ 311 jQuery( "#list-manual > li > a.open-ul-first" ).addClass('dataicon').next("ul").slideDown(300); 312 } 313 if( manual_expand_doc_treemenu_default == 2 ) { 314 jQuery("#list-manual li a").addClass('dataicon'); 315 jQuery(".doc-expandall").hide(); 316 jQuery(".doc-collapseall").show(); 317 jQuery("#list-manual li").children('ul').slideDown(300); 318 } 319 }); 320 jQuery('.doc-expandall').on('click', function(e){ 321 jQuery("#list-manual li a").addClass('dataicon'); 322 jQuery(".doc-expandall").hide(); 323 jQuery(".doc-collapseall").show(); 324 jQuery("#list-manual li").children('ul').slideDown(300); 325 }); 326 jQuery('.doc-collapseall').on('click', function(e){ 327 jQuery("#list-manual li a").removeClass('dataicon'); 328 jQuery(".doc-collapseall").hide(); 329 jQuery(".doc-expandall").show(); 330 jQuery("#list-manual li").children('ul').slideUp(300); 331 }); 332 333 /**************************************** 334 DOCUMENTATION :: DISPLAY SELECTED ARTICLE
335 *****************************************/ 336 window.onload = manual__direct_doc_artilceload_default(); 337 if( global_ajaxload_shortcode == 1 ) { // Only on page :: shortcode fix 338 window.onload = manual__direct_doc_artilceload_ajax(); 339 } else { 340 if( doc_disable_ajaxload == 1 ) { 341 window.onload = manual__direct_doc_artilceload_ajax(); 342 } 343 } 344 window.onload = manual__direct_doc_artilceload_open_close(); 345 346 function manual__direct_doc_artilceload_default(){ 347 // Doc Normal page load 348 if( jQuery( "#list-manual.doc_ul_normal li > a" ).hasClass( "doc-active" ) ){ 349 // Auto scroll if found any target # while visiting direct URL. 350 var hash = ''; 351 var pageURL = jQuery(location).attr("href"); 352 var type = pageURL.split('#'); 353 if(type.length > 1) hash = '#'+type[1]; 354 if( hash != '' ) jQuery('html,body').animate({ scrollTop: jQuery(hash).offset().top-100 }, 2000); 355 // Display correct URL at the top, for the first doc page visit. 356 var current_post_ID = jQuery("#list-manual.doc_ul_normal li > a.doc-active").attr('rel'); 357 var current_href = jQuery("#list-manual.doc_ul_normal li > a.doc-active").attr("href"); 358 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); 359 } 360 } 361 function manual__direct_doc_artilceload_ajax(){ 362 // call ajax 363 if( jQuery( "#list-manual li > a" ).hasClass( "doc-active" ) ){ 364 var current_post_ID = jQuery("#list-manual li > a.doc-active").attr('rel'); 365 if( doc_disable_ajaxload == 1 && doc_ajaxload_autoscroll == 1 ) { 366 jQuery('html,body').animate({ scrollTop: jQuery('.doc-single-post').offset().top-100 }, 2000); 367 } 368 /*** Current Page HREF ***/ 369 var current_href = jQuery("#list-manual li > a.doc-active").attr("href"); 370 History.pushState({id:jQuery("#list-manual li > a.doc-active").attr("rel")},jQuery("#list-manual li > a.doc-active").text(), current_href); 371 /*** Eof Current Page HREF ***/ 372 jQuery("#single-post-container").html("<div style=\"width:100%; margin:30px; min-height:300px;\"><div class=\"spinner-loader\"></div></div>"); 373 // Ajax call 374 jQuery.ajax({ 375 type: "post", 376 url: doc_ajax_var.url, 377 data: { action: 'display-doc-post', 378 nonce: doc_ajax_var.nonce, 379 post_id: current_post_ID, 380 }, 381 success: function(data, textStatus, XMLHttpRequest){ 382 jQuery( "#single-post-container" ).html(data); 383 jQuery( document ).trigger( "manual_jsCodeOnAjaxCallPost", { "post_id": current_post_ID, "nonce": doc_ajax_var.nonce, "onclickdisplay_feedback": kb_display_feedback_form_onclick_thumbsdown, } ); 384 if( execute_js_after_ajax_call_pg_doc == 1 ) { 385 jQuery( document ).trigger( "executeJSCodeOnAjaxCallDocPost", { "post_id": current_post_ID, "nonce": doc_ajax_var.nonce } ); 386 } 387 }, 388 error: function(MLHttpRequest, textStatus, errorThrown){ 389 } 390 }); 391 return false; 392 } 393 } 394 function manual__direct_doc_artilceload_open_close(){ 395 // - run other tree check 396 if( jQuery( "#list-manual li > a" ).hasClass( "has-child doc-active" ) ){ 397 var current_post_ID = jQuery("#list-manual li > a.doc-active").attr('rel'); 398 jQuery("#list-manual li > a.doc-active").parents("#list-manual").find("ul.parent-display-"+current_post_ID).slideDown(300); 399 jQuery("#list-manual li > a.doc-active").parents("#list-manual").find("a.doc-active > i").removeClass('fa-plus-circle'); 400 jQuery("#list-manual li > a.doc-active").parents("#list-manual").find("a.doc-active > i").addClass('fa-minus-circle'); 401 //HIDE FIRST UL OPEN 402 if( manual_expand_doc_treemenu_default != 2 ) { 403 if(jQuery( "#list-manual li > a" ).hasClass("has-child open-ul-first")) { 404 jQuery( "#list-manual li > a.open-ul-first" ).next("ul").slideUp(300); 405 jQuery( "#list-manual li > a.open-ul-first" ).removeClass('open-ul-first dataicon'); 406 } 407 } 408 } 409 if( jQuery( "#list-manual li > a" ).hasClass( "has-inner-child doc-active" ) ){ 410 var current_post_ID = jQuery("#list-manual li > a.doc-active").attr('rel'); 411 jQuery("#list-manual li > a.doc-active").addClass('dataicon child-a-icon-'+current_post_ID).next("ul").addClass('child-open-'+current_post_ID).slideDown(300); 412 jQuery("#list-manual li > a.doc-active").parents("#list-manual").find("a.doc-active > i").removeClass('fa-plus-circle'); 413 jQuery("#list-manual li > a.doc-active").parents("#list-manual").find("a.doc-active > i").addClass('fa-minus-circle'); 414 //HIDE FIRST UL OPEN 415 if( manual_expand_doc_treemenu_default != 2 ) { 416 var chkrel = jQuery("#list-manual li > a.doc-active").closest("li.nav-header").find("a.open-ul-first").attr('rel'); 417 if(typeof(chkrel) === "undefined") { 418 if(jQuery( "#list-manual li > a" ).hasClass("has-child open-ul-first")) { 419 jQuery( "#list-manual li > a.open-ul-first" ).next("ul").slideUp(300); 420 jQuery( "#list-manual li > a.open-ul-first" ).removeClass('open-ul-first dataicon'); 421 } 422 } 423 } 424 } 425 if( jQuery( "#list-manual li > a" ).hasClass( "no-child doc-active" ) ){ 426 if( manual_expand_doc_treemenu_default != 2 ) { 427 if(jQuery( "#list-manual li > a" ).hasClass("has-child doc-active")) { 428 jQuery( "#list-manual li > a.doc-active" ).next("ul").slideUp(300); 429 } 430 if(jQuery( "#list-manual li > a" ).hasClass("has-child open-ul-first")) { 431 jQuery( "#list-manual li > a.open-ul-first" ).next("ul").slideUp(300); 432 jQuery( "#list-manual li > a.open-ul-first" ).removeClass('open-ul-first dataicon'); 433 } 434 } 435 } 436 if( jQuery( "#list-manual li > a" ).hasClass( "has-no-inner-child doc-active" ) ){ 437 if( manual_expand_doc_treemenu_default != 2 ) { 438 var chkrel = jQuery("#list-manual li > a.doc-active").closest("li.nav-header").find("a.open-ul-first").attr('rel'); 439 if(typeof(chkrel) === "undefined") { 440 if(jQuery( "#list-manual li > a" ).hasClass("has-child open-ul-first")) { 441 jQuery( "#list-manual li > a.open-ul-first" ).next("ul").slideUp(300); 442 jQuery( "#list-manual li > a.open-ul-first" ).removeClass('open-ul-first dataicon'); 443 } 444 } 445 } 446 } 447 } 448 449 /************************* 450 DOCUMENTATION :: AJAX LOAD 451 **************************/ 452 jQuery(".post-link").on("click",function() { 453 jQuery("#list-manual li a").removeClass('doc-active'); 454 if( doc_ajaxload_autoscroll == 1 ) { 455 jQuery('html,body').animate({ scrollTop: jQuery('.doc-single-post').offset().top-100 }, 10); 456 } 457 jQuery(this).addClass('doc-active'); 458 jQuery("#single-post-container").html("<div style=\"width:100%; margin:30px; min-height:300px;\"><div class=\"spinner-loader\"></div></div>"); 459 // Retrieve post ID from data attribute 460 var current_post_ID = jQuery(this).attr("rel"); 461 // Ajax call 462 jQuery.ajax({ 463 type: "post", 464 url: doc_ajax_var.url, 465 data: { action: 'display-doc-post', 466 nonce: doc_ajax_var.nonce, 467 post_id: current_post_ID, 468 }, 469 success: function(data, textStatus, XMLHttpRequest){ 470 jQuery( "#single-post-container" ).html(data); 471 jQuery( document ).trigger( "manual_jsCodeOnAjaxCallPost", { "post_id": current_post_ID, "nonce": doc_ajax_var.nonce, "onclickdisplay_feedback": kb_display_feedback_form_onclick_thumbsdown, } ); 472 if( execute_js_after_ajax_call_pg_doc == 1 ) { 473 jQuery( document ).trigger( "executeJSCodeOnAjaxCallDocPost", { "post_id": current_post_ID, "nonce": doc_ajax_var.nonce } ); 474 } 475 }, 476 error: function(MLHttpRequest, textStatus, errorThrown){ 477 } 478 }); 479 return false; 480 });
481 482 /******* 483 mScroll 484 ********/ 485 if( doc_catpage_active == 1 ) { jQuery("#list-manual").mCustomScrollbar({ setHeight: doc_scroll_menu_define_height, theme:doc_scroll_menu_design }); } 486 487 /********************** 488 Accurate # Cache Search 489 **********************/ 490 if( doc_catpage_hash == 1 ) { 491 var doc_search = location.href.split('#'); 492 if ( doc_search[1] != null ){ 493 jQuery("#list-manual li a").removeClass('doc-active').filter('a[rel^="'+doc_search[1]+'"]').addClass('doc-active'); 494 jQuery("#list-manual li a").addClass('dataicon'); 495 jQuery(".doc-expandall").hide(); 496 jQuery(".doc-collapseall").show(); 497 jQuery("#list-manual li").children('ul').slideDown(300); 498 jQuery("#single-post-container").html("<div style=\"width:100%; margin:30px; min-height:300px;\"><div class=\"spinner-loader\"></div></div>"); 499 // Ajax call 500 jQuery.ajax({ 501 type: "post", 502 url: doc_ajax_var.url, 503 data: { action: 'display-doc-post', 504 nonce: doc_ajax_var.nonce, 505 post_id: doc_search[1], 506 }, 507 success: function(data, textStatus, XMLHttpRequest){ 508 jQuery( "#single-post-container" ).html(data); 509 if( doc_catpage_active == 1 ) { jQuery("#list-manual").mCustomScrollbar("scrollTo", ".doc-active"); } 510 jQuery( document ).trigger( "manual_jsCodeOnAjaxCallPost", { "post_id": doc_search[1], "nonce": doc_ajax_var.nonce, "onclickdisplay_feedback": kb_display_feedback_form_onclick_thumbsdown, } ); 511 if( execute_js_after_ajax_call_pg_doc == 1 ) { 512 jQuery( document ).trigger( "executeJSCodeOnAjaxCallDocPost", { "post_id": doc_search[1], "nonce": doc_ajax_var.nonce } ); 513 } 514 }, 515 error: function(MLHttpRequest, textStatus, errorThrown){ 516 //alert(textStatus); 517 } 518 }); 519 } 520 } 521 522 /********************** 523 HOME PAGE :: HELP DESK 524 **********************/ 525 jQuery('.loop-help-desk').owlCarousel({ 526 items : owlCarousel_item, 527 navigation :false, 528 pagination : true, 529 responsive: true, 530 lazyLoad : true, 531 itemsDesktop : [1199,3], 532 itemsDesktopSmall : [979,3], 533 itemsTablet: [768,3], 534 itemsTablet: [603,2], 535 itemsMobile : [479,1], 536 }); 537 538 /********************** 539 LIVE SEARCH URL 540 **********************/ 541 if( live_search_active == 1 ) { 542 jQuery('#searchform #s').liveSearch({ 543 url: live_search_url 544 }); 545 } 546 547 /********************** 548 KNOWLEDGEBASE 549 **********************/ 550 jQuery('.masonry-vc-grid-four, .masonry-grid, .masonry-vc-grid-six').masonry({ 551 itemSelector: '.masonry-item', 552 columnWidth: 200, 553 columnWidth: '.col-md-3, .col-md-4, .col-md-6, .col-md-12', 554 percentPosition: true 555 }); 556 jQuery('.masonry-grid-without-sidebar, .masonry-grid-inner').masonry({ 557 itemSelector: '.masonry-item', 558 columnWidth: '.col-md-6, .col-md-12', 559 percentPosition: true 560 }); 561 jQuery(".owl-portfolio").owlCarousel({ 562 slideSpeed : 300, 563 paginationSpeed : 400, 564 singleItem:true, 565 navigation:false, 566 }); 567 568 /****************** 569 HOME PAGE CAROUSEL 570 *******************/ 571 jQuery('.home-testo-desk').owlCarousel({ 572 slideSpeed : 300, 573 paginationSpeed : 400, 574 singleItem:true, 575 navigation :false, 576 items : 1, 577 }); 578 579 /********* 580 LOAD MORE 581 ***********/ 582 var loada = 1; 583 jQuery(".ajax_load_more_post a").on("click", function(b) { 584 b.preventDefault(); 585 var c = jQuery(this).attr("href"), 586 d = ".projects_holder", 587 g = jQuery(".projects_holder .filler").length, 588 e = ".portfolio_paging .ajax_load_more_post a", 589 f = jQuery(e).attr("href"), 590 h = jQuery(".portfolio_paging"), 591 i = jQuery(".portfolio_paging_loading"); 592 h.hide(), i.show(), jQuery.get(c + "", function(b) { 593 jQuery(".projects_holder .filler").slice(-g).remove(); 594 var c = jQuery(d, b).wrapInner("").html(); 595 f = jQuery(e, b).attr("href"), jQuery(d, b).waitForImages(function() { 596 jQuery("div.portfolio-section-records:last").after(c); 597 jQuery(".projects_holder").isotope("reloadItems").isotope(); 598 jQuery(".ajax_load_more_post").attr("rel") > loada ? jQuery(".ajax_load_more_post a").attr("href", f) : jQuery(".portfolio_paging").remove(); 599 h.show(); i.hide(); 600 jQuery(window).trigger("resize"); 601 }) 602 }), loada++ 603 }) 604 605 /******************************* 606 SCROLLSPY 607 ********************************/ 608 jQuery('body').scrollspy({ 609 target: '#docinlinespy' 610 });
611 jQuery('[data-spy="scroll"]').each(function () { 612 var $spy = jQuery(this).scrollspy('refresh') 613 }) 614 if(jQuery('#docinlinespy').length){ 615 jQuery('#docinlinespy').affix({ 616 offset: { 617 top: jQuery('#docinlinespy').offset().top, 618 bottom: (jQuery('footer').outerHeight(true)) + 200 619 } 620 }); 621 } 622 jQuery(".inlineclick").on("click",function() { 623 if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 624 var target = jQuery(this.hash); 625 target = target.length ? target : jQuery('[name=' + this.hash.slice(1) + ']'); 626 if (target.length) { 627 jQuery('html,body').animate({ 628 scrollTop: target.offset().top 629 }, 1000); 630 return false; 631 } 632 } 633 }); 634 635 /******************************* 636 MOBILE MENU FOR - DOCUMENTATION 637 ********************************/ 638 if( doc_responsive_treemenu == 1 ) { 639 jQuery("#list-manual").each(function(e){ 640 var checklist = ''; 641 if(mCSB_scroll == 1) checklist = '#list-manual .mCSB_container'; 642 else checklist = '#list-manual'; 643 644 var menuList = jQuery(checklist).html(); 645 jQuery('.mobile-menu-holder ul.navbar-nav').html(menuList); 646 jQuery('.mobile-menu-holder').addClass("doc-mobile-menu"); 647 jQuery(".mobile-menu-holder.doc-mobile-menu ul.navbar-nav a.doc-active").parentsUntil('.mobile-menu-holder.doc-mobile-menu .navbar-nav > li > ul', 'ul').each(function (index, el) { 648 var current_post_ID = jQuery(this).prev('a').attr("rel"); 649 jQuery(el).css('height', 'auto').addClass('child-open-' + current_post_ID).prev('a').addClass('dataicon').addClass('child-a-icon-' + current_post_ID); 650 }); 651 jQuery('.mobile-menu-holder.doc-mobile-menu .navbar-nav > li > a.has-child i, .mobile-menu-holder.doc-mobile-menu .navbar-nav li a.has-inner-child i').on('click', function(e){ 652 e.preventDefault(); 653 }); 654 jQuery(".mobile-menu-holder.doc-mobile-menu .navbar-nav").each(function(e){ 655 jQuery(".mobile-menu-holder.doc-mobile-menu .navbar-nav > li > a.has-child").next("ul").css('height', 'auto').css('display', 'block'); 656 jQuery(".mobile-menu-holder.doc-mobile-menu .navbar-nav > li > a.has-child").find("i").removeClass('fa-plus-circle'); 657 jQuery(".mobile-menu-holder.doc-mobile-menu .navbar-nav > li > a.has-child").find("i").addClass('fa-minus-circle'); 658 }); 659 jQuery('.mobile-menu-holder.doc-mobile-menu .navbar-nav li a.has-inner-child').on('click', function(e){ 660 var current_post_ID = jQuery(this).attr("rel"); 661 var current_ul_status = jQuery(this).parents(".mobile-menu-holder.doc-mobile-menu .navbar-nav").find("ul.child-open-"+current_post_ID).is(':hidden'); 662 if( current_ul_status == true ) { 663 jQuery(this).next("ul").css('height', 'auto').slideDown(300); 664 } else if( jQuery(this).parents(".mobile-menu-holder.doc-mobile-menu .navbar-nav").find('ul').hasClass('child-open-'+current_post_ID) ) { 665 jQuery(this).parents(".mobile-menu-holder.doc-mobile-menu .navbar-nav").find("ul.child-open-"+current_post_ID).not(":hidden").slideUp(300); 666 jQuery(this).parents(".mobile-menu-holder.doc-mobile-menu .navbar-nav").find('ul').removeClass('child-open-'+current_post_ID); 667 jQuery(this).parents(".mobile-menu-holder.doc-mobile-menu .navbar-nav").find("li > a.child-a-icon-"+current_post_ID+" > i").removeClass('fa-minus-circle'); 668 jQuery(this).parents(".mobile-menu-holder.doc-mobile-menu .navbar-nav").find("li > a.child-a-icon-"+current_post_ID+" > i").addClass('fa-plus-circle'); 669 jQuery(this).parents(".mobile-menu-holder.doc-mobile-menu .navbar-nav").find("li > a.child-a-icon-"+current_post_ID).removeClass('dataicon'); 670 jQuery(this).parents(".mobile-menu-holder.doc-mobile-menu .navbar-nav").find("li > a.child-a-icon-"+current_post_ID).removeClass('child-a-icon-'+current_post_ID); 671 } else { 672 jQuery(this).addClass('dataicon child-a-icon-'+current_post_ID).next("ul").addClass('child-open-'+current_post_ID).css('height', 'auto').slideDown(300); 673 jQuery(this).find("a.has-inner-child > i").removeClass('fa-plus-circle'); 674 jQuery(this).find("a.has-inner-child > i").addClass('fa-minus-circle'); 675 } 676 }); 677 }); 678 } 679 /******************************* 680 EOF -- MOBILE MENU FOR - DOCUMENTATION 681 ********************************/ 682}); 683 684 685 686jQuery(window).load(function(){ 687 688 "use strict"; 689 initmanualDropDownMenu(); 690 691 /******************************* 692 PORTFOLIO - FILTER MASNORY
693 ********************************/ 694 var $masnorygrid = jQuery('.isotope-container-masnory').isotope({ 695 itemSelector: '.element-item', 696 }); 697 jQuery('.filter-portfolio-group-masnory').on( 'click', 'li', function() { 698 var $filter = jQuery(this), 699 selector = $filter.attr('data-filter-masnory'); 700 701 $masnorygrid.imagesLoaded( function() { 702 $masnorygrid.isotope({ 703 filter: selector 704 }); 705 }); 706 jQuery(this).addClass('selected').siblings().removeClass('selected'); 707 }); 708 709 /******************************* 710 PORTFOLIO - FILTER FITROWS 711 ********************************/ 712 var $grid = jQuery('.isotope-container').isotope({ 713 itemSelector: '.element-item', 714 layoutMode: 'fitRows' 715 }); 716 jQuery('.filter-portfolio-group').on( 'click', 'li', function() { 717 var $filter = jQuery(this), 718 selector = $filter.attr('data-filter'); 719 720 $grid.imagesLoaded( function() { 721 $grid.isotope({ 722 filter: selector 723 }); 724 }); 725 jQuery(this).addClass('selected').siblings().removeClass('selected'); 726 }); 727 728 /************* 729 DOCUMENTATION 730 **************/ 731 if( doc_cookie_sh == 1 && doc_catpage_active == 1 ) { jQuery("#list-manual").mCustomScrollbar("scrollTo", ".doc-active"); } 732 733}); 734 735 736function initmanualDropDownMenu() { 737 "use strict"; 738 jQuery(".navbar ul.nav.navbar-nav li").on('mouseenter mouseleave', function (e) { 739 var window_width = jQuery(window).width(); 740 if( window_width > 767 ) { 741 if (jQuery('ul', this).length) { 742 var elm = jQuery('ul:first', this); 743 var off = elm.offset(); 744 var l = off.left; 745 var w = elm.width(); 746 var docH = jQuery(".navbar").height(); 747 var docW = jQuery(".navbar").width(); 748 var isEntirelyVisible = (l + w <= docW); 749 if (!isEntirelyVisible) { 750 jQuery(this).addClass('menu-edge'); 751 } else { 752 jQuery(this).removeClass('menu-edge'); 753 } 754 } 755 } 756 }); 757} 758 759/************** 760** FUN ACT ** 761***************/ 762jQuery(function($) { 763 "use strict"; 764 $('.funact-main-div').appear(function() { 765 $('.timer').countTo(); 766 },{accX: 90, accY: 100}); 767 768});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.