1jQuery( document ).ready( function( $ ) { 2 3 'use strict'; 4 5 /*-------------------------------------------------------------- 6 Resize header upon scrolling 7 --------------------------------------------------------------*/ 8 9 function gpResizeHeader() { 10 11 if ( ! $( 'body' ).hasClass( 'gp-relative-header' ) ) { 12 13 var mainHeaderHeight = $( '#gp-main-header' ).innerHeight(); 14 if ( $( '#gp-top-header' ).length > 0 ) { 15 var topHeaderHeight = $( '#gp-top-header' ).innerHeight(); 16 } else { 17 var topHeaderHeight = 0; 18 } 19 20 if ( $( '#gp-top-header' ).length > 0 ) { 21 var adminBar = $( '#wpadminbar' ).innerHeight(); 22 } else { 23 var adminBar = 0; 24 } 25 26 $( '#gp-fixed-header-padding' ).height( mainHeaderHeight + topHeaderHeight ); 27 28 if ( $( window ).outerWidth() <= 600 && $( 'body' ).hasClass( 'gp-fixed-header-all' ) ) { 29 if ( $( document ).scrollTop() > ( topHeaderHeight + adminBar ) ) { 30 $( 'body' ).addClass( 'gp-mobile-scrolling' ).removeClass( 'gp-desktop-scrolling' ); 31 } else { 32 $( 'body' ).removeClass( 'gp-mobile-scrolling' ); 33 } 34 } else if ( $( window ).outerWidth() <= 1082 && $( 'body' ).hasClass( 'gp-fixed-header-all' ) ) { 35 if ( $( document ).scrollTop() > topHeaderHeight ) { 36 $( 'body' ).addClass( 'gp-mobile-scrolling' ).removeClass( 'gp-desktop-scrolling' ); 37 } else { 38 $( 'body' ).removeClass( 'gp-mobile-scrolling' ); 39 } 40 } else if ( $( window ).outerWidth() > 1082 ) { 41 if ( $( document ).scrollTop() > topHeaderHeight ) { 42 $( 'body' ).addClass( 'gp-desktop-scrolling' ).removeClass( 'gp-mobile-scrolling' ); 43 } else { 44 $( 'body' ).removeClass( 'gp-desktop-scrolling' ); 45 } 46 } else { 47 $( 'body' ).removeClass( 'gp-desktop-scrolling gp-mobile-scrolling' ); 48 } 49 50 } 51 52 } 53 54 gpResizeHeader(); 55 $( window ).resize( gpResizeHeader ); 56 $( window ).scroll( gpResizeHeader ); 57 58 59 /*-------------------------------------------------------------- 60 Move left sidebar into right sidebar 61 --------------------------------------------------------------*/ 62 63 function gpMoveSidebars() { 64 if ( $( 'body' ).hasClass( 'gp-both-sidebars' ) && $( window ).outerWidth() <= 1120 && $( window ).outerWidth() >= 768 ) { 65 if ( $( 'body' ).hasClass( 'gp-sticky-sidebars' ) && $( 'div' ).hasClass( 'theiaStickySidebar' ) ) { 66 $( '#gp-sidebar-left .theiaStickySidebar > *' ).addClass( 'gp-moved-widget' ).prependTo( '#gp-sidebar-right .theiaStickySidebar' ); 67 } else { 68 $( '#gp-sidebar-left > *' ).addClass( 'gp-moved-widget' ).prependTo( '#gp-sidebar-right' ); 69 } 70 } else { 71 if ( $( 'body' ).hasClass( 'gp-sticky-sidebars' ) && $( 'div' ).hasClass( 'theiaStickySidebar' ) ) { 72 $( '.gp-moved-widget' ).prependTo( '#gp-sidebar-left .theiaStickySidebar' ); 73 } else { 74 $( '.gp-moved-widget' ).prependTo( '#gp-sidebar-left' ); 75 } 76 } 77 } 78 79 gpMoveSidebars(); 80 $( window ).resize( gpMoveSidebars ); 81 82 83 /*-------------------------------------------------------------- 84 Profile dropdown on mobiles 85 --------------------------------------------------------------*/ 86 87 $( '.gp-profile-link .main-menu-link' ).on( 'touchend', function( event ) { 88 event.preventDefault(); 89 }); 90 91 $( '.gp-profile-link .main-menu-link' ).on( 'click touchend', function( event ) { 92 $( '.gp-profile-link' ).addClass( 'gp-active' ); 93 $( '.gp-profile-link .sub-menu' ).show(); 94 }); 95 96 // Close menu when page clicked 97 $( document ).mouseup( function(e) { 98 var container = $( '.gp-profile-link' ); 99 if ( ( ! container.is( e.target ) && container.has( e.target ).length === 0 ) && $( '.gp-profile-link' ).hasClass( 'gp-active' ) ) { 100 $( '.gp-profile-link .sub-menu' ).hide(); 101 } 102 }); 103 104 105 /*-------------------------------------------------------------- 106 Open/close mobile nav 107 --------------------------------------------------------------*/ 108 109 // Open mobile nav 110 $( document ).on( 'click', '#gp-mobile-nav-button.gp-open-nav', function() { 111 $( 'html, body' ).animate({ scrollTop: 0 }, 'fast' ); 112 $( this ).removeClass( 'gp-open-nav' ).addClass( 'gp-close-nav' ); 113 $( 'body' ).addClass( 'gp-nav-active' ); 114 }); 115 116 // Close mobile nav 117 $( document ).on( 'click', '#gp-mobile-nav-button.gp-close-nav', function() { 118 $( 'body' ).removeClass( 'gp-nav-active' ); 119 $( '#gp-mobile-nav-button.gp-close-nav' ).removeClass( 'gp-close-nav' ).addClass( 'gp-open-nav' ); 120 }); 121 122 // Close mobile nav when page clicked 123 $( document ).mouseup( function(e) { 124 var container = $( '#gp-mobile-nav-button, #gp-mobile-nav' ); 125 if ( ! container.is( e.target ) && container.has( e.target ).length === 0 ) { 126 $( 'body' ).removeClass( 'gp-nav-active' ); 127 $( '#gp-mobile-nav-button' ).removeClass( 'gp-close-nav' ).addClass( 'gp-open-nav' ); 128 } 129 }); 130 131 132 /*-------------------------------------------------------------- 133 Fallback for mega menu headers 134 --------------------------------------------------------------*/ 135 136 if ( $( '.gp-megamenu' ).length > 0 ) { 137 138 $( '#gp-desktop-nav .gp-megamenu > .sub-menu > li > a, #gp-top-nav .gp-megamenu > .sub-menu > li > a' ).contents().unwrap().wrap( '<span class="gp-menu-header"></span>' ); 139 140 } 141 142 143 /*-------------------------------------------------------------- 144 Slide up/down mobile dropdown menus 145 --------------------------------------------------------------*/ 146 147 $( '#gp-mobile-nav li' ).each( function() { 148 if ( $( this ).find( 'ul' ).length > 0 ) { 149 $( '<i class="gp-mobile-dropdown-icon fa" />' ).insertAfter( $( this ).children( ':first' ) ); 150 } 151 }); 152 153 function gpMobileNav() { 154 155 $( '#gp-mobile-nav li' ).each( function() { 156 157 var navItem = $( this ), 158 navItemID = $( navItem ).attr( 'id' ); 159 160 if ( $( navItem ).find( 'ul' ).length > 0 ) { 161 162 $( document ).on( 'click', '#' + navItemID + ':not(.gp-active) > .gp-mobile-dropdown-icon', function() { 163 $( navItem ).addClass( 'gp-active' ); 164 $( navItem ).children( '.sub-menu' ).stop().slideDown() 165 $( '#gp-mobile-nav' ).addClass( 'gp-auto-height' ); 166 }); 167 168 $( document ).on( 'click', '#' + navItemID + '.gp-active > .gp-mobile-dropdown-icon', function() { 169 $( navItem ).removeClass( 'gp-active' ); 170 $( navItem ).children( '.sub-menu' ).stop().slideUp(); 171 }); 172 173 } 174 175 }); 176 177 } 178 179 gpMobileNav(); 180 181 182 /*-------------------------------------------------------------- 183 Search box 184 --------------------------------------------------------------*/ 185 186 // Open search box when button clicked 187 $( document ).on( 'click', '#gp-search-button:not(.gp-active)', function() { 188 $( this ).addClass( 'gp-active' ); 189 $( '#gp-search-box-wrapper' ).show(); 190 $( '#gp-search-box input[type="text"]' ).focus(); 191 $( '#gp-mobile-nav-button.gp-close-nav' ).removeClass( 'gp-close-nav' ).addClass( 'gp-open-nav' ); 192 $( 'body' ).removeClass( 'gp-nav-active' ); 193 }); 194 195 // Close search box when button clicked 196 $( document ).on( 'click', '#gp-search-button.gp-active', function() { 197 $( this ).removeClass( 'gp-active' ); 198 $( '#gp-search-box-wrapper' ).hide(); 199 }); 200 201 // Close search box when page clicked 202 $( document ).mouseup( function(e) { 203 var container1 = $( '#gp-search-box-wrapper' ); 204 var container2 = $( '#gp-search-button' ); 205 if ( ! container1.is( e.target ) && container1.has( e.target ).length === 0 && ! container2.is( e.target ) && container2.has( e.target ).length === 0 ) { 206 $( '#gp-search-box-wrapper' ).hide(); 207 $( '#gp-search-button' ).removeClass( 'gp-active' ); 208 } 209 }); 210 211 212 /*-------------------------------------------------------------- 213 Smooth scroll 214 --------------------------------------------------------------*/ 215 216 if ( $( 'body' ).hasClass( 'gp-smooth-scrolling' ) && $( window ).outerWidth() > 767 && $( 'body' ).outerHeight( true ) > $( window ).height() ) { 217 $( 'html' ).niceScroll({ 218 cursorcolor: '#424242', 219 scrollspeed: 100, 220 mousescrollstep: 40, 221 cursorwidth: 10, 222 cursorborder: '0', 223 zindex: 10000, 224 cursoropacitymin: 0.3, 225 cursoropacitymax: 0.6 226 }); 227 } 228 229 230 /*-------------------------------------------------------------- 231 Lightbox 232 --------------------------------------------------------------*/ 233 234 if ( ghostpool_script.lightbox == 'group_images' ) { 235 $( 'a[data-lightbox="gallery"]' ).featherlightGallery({ 236 previousIcon: '', 237 nextIcon: '' 238 }); 239 } 240 241 // Add image alt text as lightbox caption 242 if ( ghostpool_script.lightbox != 'disabled' ) { 243 $.featherlightGallery.prototype.afterContent = function() { 244
245 var caption = this.$currentTarget.find( 'img' ).attr( 'alt' ); 246 $( '.featherlight-caption' ).remove(); 247 $( '<div class="featherlight-caption">' ).text( caption ).appendTo( this.$instance.find( '.featherlight-content' ) ); 248 249 var img = $( '.featherlight-content img' ); 250 $( '<img>' ).attr( 'src', $( img ).attr( 'src' ) ).load( function() { 251 var realWidth = this.width; 252 $( '.featherlight-content' ).css( 'max-width', realWidth ); 253 }); 254 255 }; 256 } 257 258 259 /*-------------------------------------------------------------- 260 Blog masonry 261 --------------------------------------------------------------*/ 262 263 if ( $( '.gp-blog-wrapper' ).hasClass( 'gp-blog-masonry' ) ) { 264 265 var container = $( '.gp-blog-masonry .gp-section-loop-inner' ), 266 element = container; 267 268 if ( container.find( 'img' ).length == 0 ) { 269 element = $( '<img />' ); 270 } 271 272 imagesLoaded( element, function( instance ) { 273 274 container.isotope({ 275 itemSelector: 'section', 276 percentPosition: true, 277 masonry: { 278 columnWidth: container.find( 'section' )[0], 279 gutter: '.gp-gutter-size' 280 } 281 }); 282 283 container.animate( { 'opacity': 1 }, 1300 ); 284 $( '.gp-pagination' ).animate( { 'opacity': 1 }, 1300 ); 285 $( '.gp-load-more' ).animate( { 'opacity': 1 }, 1300 ); 286 287 }); 288 289 } 290 291 292 /*-------------------------------------------------------------- 293 Load more 294 --------------------------------------------------------------*/ 295 296 var maxNumPages = ghostpool_script.max_num_pages; 297 298 $( '#gp-content .gp-archive-wrapper .gp-section-loop-inner' ).infinitescroll({ 299 debug: false, 300 loading: { 301 finishedMsg: '', 302 img: ghostpool_script.get_template_directory_uri + '/lib/framework/images/blank.gif', 303 msgText: '', 304 speed: 'fast', 305 }, 306 nextSelector: '#gp-content .gp-archive-wrapper ul.page-numbers a', 307 navSelector: '#gp-content .gp-archive-wrapper .gp-pagination', 308 itemSelector: '#gp-content .gp-archive-wrapper section', 309 maxPage: maxNumPages, 310 extraScrollPx: 0, 311 bufferPx: 0 312 }, function( json, opts ) { 313 if ( opts.state.currPage == maxNumPages ) { 314 $( '#gp-content .gp-archive-wrapper .gp-load-more' ).remove(); 315 } 316 }); 317 $( '#gp-content .gp-archive-wrapper .gp-section-loop-inner' ).infinitescroll( 'unbind' ); 318 $( '#gp-content .gp-archive-wrapper .gp-load-more-button' ).click( function() { 319 $( '#gp-content .gp-archive-wrapper .gp-section-loop-inner' ).infinitescroll( 'retrieve' ); 320 return false; 321 }); 322 323 324 /*-------------------------------------------------------------- 325 Gallery category post slider 326 --------------------------------------------------------------*/ 327 328 $( window ).on( 'load', function() { 329 $( '.gp-blog-wrapper:not(.gp-blog-masonry) .gp-post-format-gallery-slider, .gp-showcase-wrapper .gp-post-format-gallery-slider' ).flexslider( { 330 animation: 'fade', 331 slideshowSpeed: 9999999, 332 animationSpeed: 600, 333 directionNav: true, 334 controlNav: false, 335 pauseOnAction: true, 336 pauseOnHover: false, 337 prevText: '', 338 nextText: '', 339 smoothHeight: true 340 }); 341 }); 342 343 $( '.gp-blog-masonry .gp-post-format-gallery-slider' ).flexslider( { 344 animation: 'fade', 345 slideshowSpeed: 9999999, 346 animationSpeed: 600, 347 directionNav: true, 348 controlNav: false, 349 pauseOnAction: true, 350 pauseOnHover: false, 351 prevText: '', 352 nextText: '' 353 }); 354 355 356 /*-------------------------------------------------------------- 357 Gallery single post slider 358 --------------------------------------------------------------*/ 359 360 $( window ).on( 'load', function() { 361 $( '.gp-entry-featured .gp-post-format-gallery-slider' ).flexslider( { 362 animation: 'fade', 363 slideshowSpeed: 9999999, 364 animationSpeed: 600, 365 directionNav: true, 366 controlNav: false, 367 pauseOnAction: true, 368 pauseOnHover: false, 369 prevText: '', 370 nextText: '', 371 smoothHeight: true 372 }); 373 }); 374 375 376 /*-------------------------------------------------------------- 377 Post submission image upload 378 --------------------------------------------------------------*/ 379 380 function imageURL( input ) { 381 if ( input.files && input.files[0] ) { 382 var reader = new FileReader(); 383 reader.onload = function( e ) { 384 $( '.gp-post-submission-image img' ).attr( 'src', e.target.result ).addClass( 'gp-show-image' ); 385 }
386 reader.readAsDataURL( input.files[0] ); 387 } 388 } 389 390 $( '#gp-post-image' ).on( 'change', function() { 391 var fileExtension = ['jpeg', 'jpg', 'png', 'gif', 'bmp', 'ico']; 392 if ( $.inArray( $( this ).val().split( '.' ).pop().toLowerCase(), fileExtension ) == -1 ) { 393 $( 'label[for="gp-post-image"]' ).text( $( this ).data( 'image-not-added' ) ); 394 } else { 395 $( 'label[for="gp-post-image"]' ).text( $( this ).data( 'image-added' ) ); 396 } 397 imageURL( this ); 398 }); 399 400 401 /*-------------------------------------------------------------- 402 Vote Up/Down 403 --------------------------------------------------------------*/ 404 405 // Get all voting containers 406 $( '.gp-voting-container' ).each( function( index ) { 407 408 // Get data attribute 409 var content_id = $( this ).data( 'content-id' ); 410 411 var itemName = "gpvoting" + content_id; 412 413 // Check if this content has localstorage 414 if ( localStorage.getItem( itemName ) ) { 415 416 // Check if it's Up or Down vote 417 if ( localStorage.getItem( "gpvoting" + content_id + "-1" ) ) { 418 $( this ).find( '.gp-voting-up' ).addClass( 'gp-voted' ); 419 } 420 if ( localStorage.getItem( "gpvoting" + content_id + "-0" ) ) { 421 $( this ).find( '.gp-voting-down' ).addClass( 'gp-voted' ); 422 } 423 } 424 425 }); 426 427 428 /*-------------------------------------------------------------- 429 Padding bottom of hub header 430 --------------------------------------------------------------*/ 431 432 function gpHubHeaderPadding() { 433 if ( $( '.gp-hub-header #gp-page-header-video' ).length ) { 434 var height = $( '#gp-hub-details .gp-featured-caption' ).height(); 435 if ( $( window ).outerWidth() <= 859 ) { 436 $( '.gp-hub-header #gp-page-header-video' ).css( 'padding-bottom', height + 20 ); 437 } else { 438 $( '.gp-hub-header #gp-page-header-video' ).css( 'padding-bottom', height + 30 ); 439 } 440 } 441 } 442 443 gpHubHeaderPadding(); 444 $( window ).resize( gpHubHeaderPadding ); 445 446 447 /*-------------------------------------------------------------- 448 Slide up/down hub tabs mobile navigation 449 --------------------------------------------------------------*/ 450 451 function gpTabsMobileNav() { 452 var clicked = false; 453 $( '#gp-hub-tabs-mobile-nav-button' ).on( 'click', function () { 454 if ( clicked ) { 455 clicked = false; 456 $( '#gp-hub-tabs ul' ).stop().slideUp(); 457 $( this ).removeClass( 'gp-active' ); 458 } else { 459 clicked = true; 460 $( '#gp-hub-tabs ul' ).stop().slideDown(); 461 $( this ).addClass( 'gp-active' ); 462 } 463 }); 464 465 $( '#gp-hub-tabs li a' ).click( function() { 466 clicked = false; 467 $( '#gp-hub-tabs ul' ).stop().slideUp(); 468 $( this ).removeClass( 'gp-active' ); 469 }); 470 471 472 } 473 474 gpTabsMobileNav(); 475 476 477 /*-------------------------------------------------------------- 478 Images tab page 479 --------------------------------------------------------------*/ 480 481 if ( $( 'div' ).hasClass( 'gp-image-tab-items' ) ) { 482 483 // Load lazy images 484 $( this ).find( '.gp-image-item img' ).lazyload({ 485 effect: 'fadeIn' 486 }); 487 $( '.gp-image-tab-items' ).animate( { 'opacity': 1 }, 1300 ); 488 489 // Add alt text to Lightbox 490 $( '.gp-image-tab-items' ).featherlightGallery({ 491 filter: 'a', 492 afterContent: function() { 493 this.$legend = this.$legend || $( '<div class="gp-legend"/>' ).insertAfter( this.$content ); 494 this.$legend.text( this.$currentTarget.attr( 'title' ) ); 495 } 496 }); 497 498 } 499 500 if ( $( 'div' ).hasClass( 'gp-image-items' ) ) { 501 502 // Add alt text to Lightbox 503 $( '.gp-image-items' ).featherlightGallery({ 504 filter: 'a', 505 afterContent: function() { 506 this.$legend = this.$legend || $( '<div class="gp-legend"/>' ).insertAfter( this.$content ); 507 this.$legend.text( this.$currentTarget.attr( 'title' ) ); 508 } 509 }); 510 511 } 512 513 514 /*-------------------------------------------------------------- 515 Follow Items 516 --------------------------------------------------------------*/ 517 518 $( '.gp-unfollow-item' ).show(); 519 520 $( document ).on( 'click', '.gp-follow-button', function( e ) { 521 522 e.preventDefault(); 523 524 var button = $( this ); 525 526 button.addClass( 'gp-follow-loading' ); 527 528 var url = document.location.href.split( '#' )[0]; 529 var params = button.attr( 'href' ).replace( '?', '' ) + '&ajax=1'; 530 531 $.get( url, params, function( data ) { 532 button.replaceWith( data ); 533 button.removeClass( 'gp-follow-loading' ); 534 }); 535 536 // Following page 537 if ( button.hasClass( 'gp-unfollow-item' ) ) { 538 button.parent( 'section' ).fadeOut(); 539 } 540 541 return false;
542 543 }); 544 545 // Hide all items when all unfollowed 546 $( document ).on( 'click', '.gp-unfollow-all-items', function( e ) { 547 548 e.preventDefault(); 549 550 $( '.gp-following-wrapper .gp-section-loop-inner' ).fadeOut(); 551 552 }); 553 554 555 /*-------------------------------------------------------------- 556 Category filter 557 --------------------------------------------------------------*/ 558 559 $( '#gp-filter-release-date' ).change( function() { 560 if ( $( this ).val() == 'date_range' ) { 561 $( '.gp-filter-release-date-range' ).addClass( 'gp-selected' ); 562 } else { 563 $( '.gp-filter-release-date-range' ).removeClass( 'gp-selected' ); 564 } 565 }); 566 567 $( function() { 568 $( '.gp-datepicker' ).datepicker({ constrainInput: false }); 569 }); 570 571 572 /*-------------------------------------------------------------- 573 Load scripts in WPB tabs 574 --------------------------------------------------------------*/ 575 576 $( '.vc_tta-tab, .vc_tta-panel-title' ).click( function() { 577 578 setTimeout( function() { 579 $( window ).trigger( 'resize' ); 580 }, 0 ); 581 setTimeout( function() { 582 $( window ).trigger( 'resize' ); 583 }, 2 ); 584 585 }); 586 587 588 /*-------------------------------------------------------------- 589 Login box 590 --------------------------------------------------------------*/ 591 592 // Submit forms 593 var formArray = ['.gp-login-form', '.gp-lost-password-form', '.gp-register-form']; 594 595 $.each( formArray, function( index, value ) { 596 597 $( value ).submit( function() { 598 var form = $( this ); 599 form.find( '.gp-login-results' ).html( '<span class="gp-verify-form">' + $( '.gp-login-results' ).data( 'verify' ) + '</span>' ).fadeIn(); 600 var input_data = form.serialize(); 601 $.ajax({ 602 type: 'POST', 603 url: ghostpool_script.url, 604 data: input_data, 605 success: function( msg ) { 606 607 form.find( '.gp-verify-form' ).remove(); 608 609 $( '<span>' ).html( msg ).appendTo( form.find( '.gp-login-results' ) ).fadeIn( 'slow' ); 610 611 if ( $( '.gp-register-form' ).find( '.gp-login-results .gp-success' ) ) { 612 $( '.gp-register-form' ).find( 'p, .gglcptch, .wp-submit' ).hide(); 613 } 614 615 }, 616 error: function( xhr, status, error ) { 617 618 // Reset captcha on error 619 if ( $( '.gglcptch > div' ).length > 0 ) { 620 grecaptcha.getResponse(); 621 grecaptcha.reset(); 622 } 623 624 form.find( '.gp-verify-form' ).remove(); 625 626 $( '<span>' ).html( xhr.responseText ).appendTo( form.find( '.gp-login-results' ) ).fadeIn( 'slow' ); 627 628 } 629 }); 630 return false; 631 }); 632 633 }); 634 635 // Close modal window when clicking outside of it 636 $( document ).mouseup( function( e ) { 637 var container = $( '#gp-login-modal' ); 638 if ( ! container.is( e.target ) && container.has( e.target ).length === 0 ) { 639 $( '#login' ).hide(); 640 } 641 }); 642 643 // Close modal window when clicking close button 644 $( '#gp-login-close' ).click( function() { 645 $( '#login' ).hide(); 646 $( '.gp-login-results > span' ).remove(); 647 }); 648 649 // Open login modal window when clicking links 650 $( '.gp-login-link, a[href="#login"]' ).click( function() { 651 $( '#login' ).show(); 652 $( '.gp-login-form-wrapper' ).show(); 653 $( '.gp-register-form-wrapper, .gp-lost-password-form-wrapper, .gp-social-login-form-wrapper' ).hide(); 654 $( '.gp-login-results > span' ).remove(); 655 }); 656 657 // Open login modal window directly from URL 658 if ( /#login/.test( window.location.href ) ) { 659 $( '#login' ).show(); 660 $( '.gp-login-form-wrapper' ).show(); 661 $( '.gp-register-form-wrapper, .gp-lost-password-form-wrapper, .gp-social-login-form-wrapper' ).hide(); 662 $( '.gp-login-results > span' ).remove(); 663 } 664 665 // Open lost password modal window when clicking link 666 $( '.gp-lost-password-link' ).click( function() { 667 $( '.gp-lost-password-form-wrapper' ).show(); 668 $( '.gp-register-form-wrapper, .gp-login-form-wrapper, .gp-social-login-form-wrapper' ).hide(); 669 $( '.gp-login-results > span' ).remove(); 670 }); 671 672 // Open lost password modal window directly from URL 673 if ( /#lost-password/.test( window.location.href ) ) { 674 $( '#login' ).show(); 675 $( '.gp-lost-password-form-wrapper' ).show(); 676 $( '.gp-register-form-wrapper, .gp-login-form-wrapper, .gp-social-login-form-wrapper' ).hide(); 677 $( '.gp-login-results > span' ).remove(); 678 } 679 680 // Open registration modal window when clicking links 681 $( 'a[href="#register"]' ).click( function() { 682 $( '#login' ).show(); 683 $( '.gp-register-form-wrapper, .gp-register-form .login-form > p, .gp-register-form .wp-submit' ).show(); 684 $( '.gp-register-form .login-form p > input[type="text"]' ).val( '' ); 685 $( '.gp-login-form-wrapper, .gp-lost-password-form-wrapper, .gp-social-login-form-wrapper' ).hide(); 686 $( '.gp-login-results > span' ).remove(); 687 }); 688 689 // Open registration modal window directly from URL 690 if ( /#register/.test( window.location.href ) ) { 691 $( '#login' ).show(); 692 $( '.gp-register-form-wrapper, .gp-register-form .login-form > p, .gp-register-form .wp-submit' ).show(); 693 $( '.gp-register-form .login-form p > input[type="text"]' ).val( '' ); 694 $( '.gp-login-form-wrapper, .gp-lost-password-form-wrapper, .gp-social-login-form-wrapper' ).hide(); 695 $( '.gp-login-results > span' ).remove(); 696 } 697 698 // Close reset success message 699 $( '#gp-close-reset-message' ).click( function() { 700 $( '#gp-reset-message' ).remove(); 701 }); 702 703});
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.