1jQuery(document).ready(function ($) { 2 "use strict"; 3 4 // set header element spacing 5 var topHeaderHeight = $('#top-header').height(); 6 var mainHeaderHeight = $('#main-header').height(); 7 var totalHeaderHeight = topHeaderHeight + mainHeaderHeight; 8 9 //$('#main-header').css("top", topHeaderHeight); 10 //$('.header-fill').css("padding-top", totalHeaderHeight); 11 12 //disable right click on all the home video elements 13 $('.section-home-video').bind('contextmenu',function() { return false; }); 14 // home page video section go to code 15 $(".go-to").click(function () { 16 var header_height = $('#main-header').outerHeight(); 17 var top_header = $('#top-header').outerHeight(); 18 $('html,body').animate({ 19 scrollTop: $(".section-goto-block").offset().top - header_height - top_header 20 }, 21 1200); 22 }); 23 // home page team carousel initialization 24 $('.hps-teams').slick({ 25 slidesToShow: 4, 26 responsive: [ 27 { 28 breakpoint: 1024, 29 settings: { 30 slidesToShow: 3, 31 slidesToScroll: 3, 32 infinite: true, 33 dots: false 34 } 35 }, 36 { 37 breakpoint: 600, 38 settings: { 39 slidesToShow: 2, 40 slidesToScroll: 2 41 } 42 }, 43 { 44 breakpoint: 480, 45 settings: { 46 slidesToShow: 1, 47 slidesToScroll: 1 48 } 49 } 50 // You can unslick at a given breakpoint now by adding: 51 // settings: "unslick" 52 // instead of a settings object 53 ], 54 prevArrow: '<span class="slick-prev">PREV</span>', 55 nextArrow: '<span class="slick-next">NEXT</span>' 56 }); 57 // education page blog carousel initialization 58 $('.recent-post-slide').slick({ 59 slidesToShow: 3, 60 dots: false, 61 autoplay: true, 62 autoplaySpeed: 8000, 63 responsive: [ 64 { 65 breakpoint: 1024, 66 settings: { 67 slidesToShow: 2, 68 slidesToScroll: 2, 69 infinite: true, 70 dots: false 71 } 72 }, 73 { 74 breakpoint: 768, 75 settings: { 76 slidesToShow: 1, 77 slidesToScroll: 1 78 } 79 } 80 // You can unslick at a given breakpoint now by adding: 81 // settings: "unslick" 82 // instead of a settings object 83 ], 84 prevArrow: '<span class="slick-prev"><img src="/wp-content/themes/Divi-child-01/images/slide-nav-left.png" alt="" ></span>', 85 nextArrow: '<span class="slick-next"><img src="/wp-content/themes/Divi-child-01/images/slide-nav-right.png" alt="" ></span>', 86 }); 87 // $('.hps-testimonials').slick({ 88 // slidesToShow: 1, 89 // arrows: false, 90 // dots: true, 91 // adaptiveHeight: false, 92 // fade: true, 93 // autoplay: true, 94 // autoplaySpeed: 5000 95 // // speed: 3000 96 // }); 97 // hps-alliance page left slide 98 $('.hps_pricingpage_left_slide').slick({ 99 slidesToShow: 1, 100 arrows: false, 101 dots: true, 102 adaptiveHeight: true, 103 autoplay: true 104 }); 105 // Home - Spotlight 106 $('.home-spotlight-slideshow').slick({ 107 slidesToShow: 1, 108 arrows: true, 109 dots: false, 110 autoplay: true, 111 centerPadding: 0 112 }); 113 114 /* Slick needs no get Reinitialized on window Resize after it was destroyed */ 115 $(window).on('load resize orientationchange', function() { 116 $('.total-resource .et_pb_row_3').each(function(){ 117 var $carousel = $(this); 118 /* Initializes a slick carousel only on mobile screens */ 119 // slick on mobile 120 if ($(window).width() > 980) { 121 if ($carousel.hasClass('slick-initialized')) { 122 $carousel.slick('unslick'); 123 } 124 } else { 125 if (!$carousel.hasClass('slick-initialized')) { 126 $carousel.slick({ 127 autoplay: true, 128 slidesToShow: 1, 129 slidesToScroll: 1, 130 dots: true, 131 mobileFirst: true, 132 }); 133 } 134 } 135 }); 136 }); 137 138 /* Slick needs no get Reinitialized on window Resize after it was destroyed */ 139 $(window).on('load resize orientationchange', function() { 140 $('.total-resource .service-blocks').each(function(){ 141 var $carousel = $(this); 142 /* Initializes a slick carousel only on mobile screens */ 143 // slick on mobile 144 if ($(window).width() > 980) { 145 if ($carousel.hasClass('slick-initialized')) { 146 $carousel.slick('unslick'); 147 } 148 } else { 149 if (!$carousel.hasClass('slick-initialized')) { 150 $carousel.slick({ 151 autoplay: true, 152 slidesToShow: 1, 153 slidesToScroll: 1, 154 dots: true, 155 mobileFirst: true, 156 }); 157 } 158 } 159 }); 160 }); 161 162 /* Slick needs no get Reinitialized on window Resize after it was destroyed */ 163 $(window).on('load resize orientationchange', function() { 164 $('.home-blog .column.size-1of1').each(function(){ 165 var $carousel = $(this); 166 /* Initializes a slick carousel only on mobile screens */ 167 // slick on mobile 168 if ($(window).width() > 980) { 169 if ($carousel.hasClass('slick-initialized')) { 170 $carousel.slick('unslick'); 171 } 172 } else { 173 if (!$carousel.hasClass('slick-initialized')) { 174 $carousel.slick({ 175 autoplay: true, 176 slidesToShow: 1, 177 slidesToScroll: 1, 178 dots: true, 179 mobileFirst: true, 180 }); 181 } 182 } 183 }); 184 }); 185 186 $('.section-testimonials-block, ul.slick-dots li').click(function (e) { 187 e.preventDefault(); 188 var target = $(e.target); 189 if (target.is('li')) { 190 return; 191 } else { 192 var href = $(this).find('h2 a').attr('href'); 193 if (typeof href != 'undefined') 194 window.location = href; 195 } 196 }); 197 // code for linking home page section image block headings 198 if ($('body').hasClass('home')) { 199 $('.section-image-block').click(function () { 200 var href = $(this).find('h3 a').attr('href'); 201 window.location = href; 202 }); 203 // honeycomb click case
204 $('ul#hexGrid li.hex').click(function () { 205 var href = $(this).find('a').attr('href'); 206 window.location = href; 207 }); 208 } 209 $('.hexagon-wrap').click(function () { 210 var href = $(this).next().next('a.btn').attr('href'); 211 window.location = href; 212 }); 213 //Simple jQuery Accordion 214 //ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING) 215 $('.accordion-title').click(function () { 216 //REMOVE THE ON CLASS FROM ALL BUTTONS 217 $('.accordion-title').removeClass('on'); 218 //NO MATTER WHAT WE CLOSE ALL OPEN SLIDES 219 $('.accordion-content').slideUp('normal'); 220 //IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT 221 if ($(this).next().is(':hidden')) { 222 //ADD THE ON CLASS TO THE BUTTON 223 $(this).addClass('on'); 224 //OPEN THE SLIDE 225 $(this).next().slideDown('normal'); 226 } 227 }); 228 /*** REMOVE IF MOUSEOVER IS NOT REQUIRED ***/ 229 //ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER 230 $('.accordion-title').mouseover(function () { 231 $(this).addClass('over'); 232 //ON MOUSEOUT REMOVE THE OVER CLASS 233 }).mouseout(function () { 234 $(this).removeClass('over'); 235 }); 236 /*** END REMOVE IF MOUSEOVER IS NOT REQUIRED ***/ 237 /********************* 238 CLOSES ALL S ON PAGE LOAD 239 *********************/ 240 $('.accordion-content').hide(); 241 $(".tab").click(function () { 242 $(".tab-content-block .tab-content").hide(); 243 $($(this).attr("data-href")).show(); 244 }); 245 $(".tab").click(function () { 246 $(".tab").removeClass("active"); 247 $(this).addClass("active"); 248 }); 249 // code for ajax pagination in the blog page 250 251 // if ($('body').hasClass('blog')) { 252 // // for inviewport 253 // var t = $(document).height() - $('#main-footer').height(); 254 // var $div = $('#main-footer'); 255 // var sflag = false; 256 // var endflag = false; 257 // $(window).scroll(function (e) { 258 // if ($div.is(':in-viewport(t)')) { 259 // $('.blog-item').removeClass('new-blog-item'); 260 // // now the about contianer is in the viewport 261 // // now do ajax load 262 // var next_href = $('#hps-blog-container .pagination span.current').next().attr('href'); 263 // console.log(next_href); 264 // if (!sflag && !endflag) { 265 // sflag = true; 266 // // $('<img style="margin: 0 auto; display: block;" class="hps-loading" src="/wp-content/themes/Divi-child-01/images/progress_bar.gif">').insertBefore('.pagination'); 267 // $('<div class="spinner"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>').insertBefore('.pagination'); 268 // $("<div>").load(next_href + '#hps-blog-container div', function () { 269 // $('.spinner').remove(); 270 // $(this).find("div.blog-item").addClass('new-blog-item'); 271 // var content = $(this).find("div.blog-item"); 272 // var paginationcontent = $(this).find("div.pagination"); 273 // $(content).insertBefore('.pagination'); 274 // $('div.pagination').replaceWith(paginationcontent); 275 // var next_href = $('.pagination span.current').next().attr('href'); 276 // if (typeof( next_href ) == "undefined") { 277 // endflag = true; 278 // // alert('Your are at the end. Thank You.'); 279 // } 280 // // reset the newly match height elements with library 281 // setTimeout( function(){ 282 // $('.new-blog-item').matchHeight(); 283 // }, 800 ); 284 // sflag = false; 285 // }); 286 // } 287 // } 288 // }); 289 // } 290 // code for toggling date archive and category archive in the sidebar of blog and single page
291 $('.widget_archive h4').click(function () { 292 $('.footer-widget .widget_archive h4').toggleClass('opened'); 293 $('.widget_archive ul').slideToggle(); 294 }); 295 $('.widget_categories h4').click(function () { 296 $('.footer-widget .widget_categories h4').toggleClass('opened'); 297 $('.widget_categories ul').slideToggle(); 298 }); 299 // code for validation error of comment form in the single blog page. 300 $('#author-msg-form').find("input[type=textarea], textarea").attr('placeholder', 'Message*'); 301 $('#author-msg-form').validate({ 302 rules: { 303 user_name: { 304 required: true, 305 minlength: 2 306 }, 307 user_email: { 308 required: true, 309 email: true 310 }, 311 message_content: { 312 required: true, 313 minlength: 20 314 } 315 }, 316 messages: { 317 user_name: { 318 required: "Please enter your name", 319 minlength: "Please fill name of at least 2 chars." 320 }, 321 user_email: "Please enter a valid email address.", 322 message_content: "Please enter your message." 323 }, 324 // errorElement: "div", 325 // errorPlacement: function(error, element) { 326 // element.after(error); 327 // } 328 }); 329 // code for swapping column images in front for screen less than 980 330 if ($(window).width() < 980) { 331 if ($('.swap-after-heading').length) { 332 $('.swap-after-heading').each(function (i) { 333 var $c1_content = $(this); 334 var $c1_after = $c1_content.closest('.et_pb_section').find('h1, h2, h3, h4'); 335 $c1_after.after($c1_content); 336 }); 337 } 338 if ($('.swap-after-row').length) { 339 $('.swap-after-row').each(function (i) { 340 var $c2_content = $(this); 341 var $c2_after = $c2_content.closest('.et_pb_section').find('.et_pb_row:first-child'); 342 $c2_after.after($c2_content); 343 }); 344 } 345 } 346 // matchHeight is used for left border in sitemap template 347 if ( $('.match-height').length || $('.border-box').length ) { 348 setTimeout(function(){ 349 $('.border-box').matchHeight(); 350 $('.match-height').matchHeight(); 351 }, 800); 352 } 353 // matchHeight is used for the new home page's recent articles section. 354 if ( $('.et_pb_gutters3 .et_pb_column_4_4 .et_pb_blog_grid .column.size-1of3').length ) { 355 setTimeout(function(){ 356 $('.et_pb_gutters3 .et_pb_column_4_4 .et_pb_blog_grid .column.size-1of3').matchHeight(); 357 }, 800); 358 } 359 // matchHeight is used for service blocks. 360 if ( $('.slide.matchheight').length ) { 361 setTimeout(function(){ 362 $('.slide.matchheight').matchHeight(); 363 }, 800); 364 } 365 //Scroll To Top 366 $('body').prepend('<a href="#" class="back-to-top">Back to Top</a>'); 367 var amountScrolled = 100; 368 $(window).scroll(function () { 369 if ($(window).scrollTop() > amountScrolled) { 370 $('a.back-to-top').fadeIn('slow'); 371 } else { 372 $('a.back-to-top').fadeOut('slow'); 373 } 374 }); 375 $('a.back-to-top, a.simple-back-to-top').click(function () { 376 $('html, body').animate({ 377 scrollTop: 0 378 }, 700); 379 return false; 380 }); 381 //$('.education-col').hover(function(){ 382 // $(this).find(".hidden-part").slideToggle('slow'); 383 //}); 384 // Now work on submit the form using AJAX 385 $('#author-msg-form').submit(function (e) { 386 e.preventDefault(); 387 if ($('form#author-msg-form').valid()) { 388 $(this).unbind("submit"); 389 $("#msg-to-author-submit").attr("disabled", "disabled"); 390 var formData = $("form#author-msg-form").serializeArray(); 391 var $button = $(this); 392 $button.attr("disabled", true); 393 var _data = { 394 'action': 'send_msg_to_author', 395 'data': formData, 396 'post_id': ajax_object.post_id 397 }; 398 $.ajax({ 399 url: ajax_object.ajax_url, 400 type: 'post', 401 data: _data, 402 success: function (response) { 403 if (response.status == 'success') { 404 var $message = 'Your message has been sent to ' + response.display_name; 405 console.log($message); 406 $('form#author-msg-form p.status').text($message); 407 $('form#author-msg-form ').trigger("reset"); 408 $("#msg-to-author-submit").attr("disabled", false); 409 } 410 } 411 }); 412 } 413 }); 414 //adding animation on cart count on top header 415 $(".add_to_cart_button, .single_add_to_cart_button").click(function () { 416 var div = $(".cart-contents").find(".items_number"); 417 div.animate({ 418 height: '50px', 419 width: '50px', 420 'font-size': '30px', 421 'padding-top': '18px', 422 opacity: '0.8' 423 }, "slow"); 424 }); 425 // functionality to expoert csv in alliance members page 426 $('body').on('click', 'button.export', function () { 427 var $this = $(this); 428 var keyword = $(this).attr('data-keyword'); 429 $.ajax({ 430 url: ajax_object.ajax_url, 431 type: 'post', 432 data: { 433 action : 'export', 434 keyword : keyword 435 }, 436 dataType: 'json', 437 success: function (data) { 438 if (data.status) { 439 document.location = data.path; 440 } else { 441 alert(data.msg); 442 } 443 } 444 }); 445 }); 446 447 $('body').on('click', 'button.export-update', function () { 448 var $this = $(this); 449 var keyword = $(this).attr('data-keyword'); 450 $.ajax({ 451 url: ajax_object.ajax_url, 452 type: 'post', 453 data: { 454 action : 'exportupdate', 455 keyword : keyword 456 }, 457 dataType: 'json', 458 success: function (data) { 459 if (data.status) { 460 var a = document.createElement('a'); 461 var url = data.path; 462 a.href = url; 463 a.download = 'alliance_members_export.csv'; 464 document.body.append(a); 465 a.click(); 466 a.remove(); 467 window.URL.revokeObjectURL(url); 468 } else { 469 alert(data.msg); 470 } 471 } 472 }); 473 }); 474 // now this code here is for making Divi video module to play at one click 475 $('.et_pb_video_overlay').click(function() { 476 var video = $(this).prev('.et_pb_video_box').find('video').get(0); 477 video.play(); 478 }); 479 480 // Add closing X button to home page's "5 star consultants" row. 481 $('#home5star').append('<a href="#hideme" class="close-btn">X</a>'); 482 483 // Onclick of closing X button, hide the entire row. 484 $('.close-btn').click( function(e) { 485 e.preventDefault(); 486 $("#home5star").toggleClass("hideme"); 487 } ); 488 489 // Add placeholder text to Teams product input field. 490 $('#team_name').attr('placeholder', 'Enter your team name'); 491 492 493 494 // Get Team Member data. 495 496 var object1 = ajax_object.designation; 497 498 // Loop through team member data. 499 for (const [key, value] of Object.entries(object1)) { 500 // Append the designation to specific team member. 501 $( ".about-leadership .et_pb_ajax_pagination_container article.post-" + `${key}` + " h2" ).append( "<span>" + `${value}` + "</span>" ); 502 } 503 504 // Get the video modal. 505 var videoModal = document.getElementById("videoModal"); 506 507 // Watch video button. 508 var videoBtn = document.getElementById("watch-video"); 509 510 if ( videoBtn ) { 511 // When the user clicks on the button, open the modal 512 videoBtn.onclick = function() { 513 videoModal.style.display = "block"; 514 } 515 516 // When the user clicks anywhere outside of the modal, close it 517 window.onclick = function(event) { 518 if (event.target == videoModal) { 519 videoModal.style.display = "none"; 520 $("#yt-player .fluid-width-video-wrapper iframe").attr("src", $("#yt-player .fluid-width-video-wrapper iframe").attr("src")); 521 } 522 } 523 } 524 525 // Get the modal. 526 var modal = document.getElementById("myModal"); 527 // Get the button that opens the modal. 528 var btn = document.getElementById("myBtn"); 529 // Get the <span> element that closes the modal. 530 var span = document.getElementsByClassName("close")[0]; 531 532 if ( btn ) { 533 // When the user clicks on the button, open the modal 534 btn.onclick = function() { 535 modal.style.display = "block"; 536 } 537 538 span.onclick = function() { 539 modal.style.display = "none"; 540 } 541 542 window.onclick = function(event) { 543 if (event.target == modal) { 544 modal.style.display = "none"; 545 } 546 } 547 } 548 549 // Toggle the search box when the search icon is clicked. 550 $('#et_top_search_new i').click( function() { 551 $(".search-wrapper").toggleClass("show-me"); 552 $("#et_top_search_new i").toggleClass("fa-search"); 553 $("#et_top_search_new i").toggleClass("fa-times"); 554 $(".menu-col-top").toggleClass("hide-me"); 555 } ); 556 557 // Move Switch user button to bottom of page 558 $("#user_switching_switch_on").detach().appendTo('#page-container'); 559 560}); 561//<iframe height="80%" width="80%" title="" class="" src="http://www.healthcareprovidersolutions.net/wp-content/uploads/hps-promo-video.mp4"></iframe>
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.