https://mdpharmacourses.com/wp-content/plugins/sfwd-lms/themes/ld30/assets/js/learndash.js?ver=3.1.3
1jQuery(document).ready(function($) { 2 3 var hash = window.location.hash; 4 5 initLoginModal(); 6 if (hash == '#login') { 7 openLoginModal(); 8 } 9 10 if( typeof ldGetUrlVars()['login'] !== 'undefined' ) { 11 12 var loginStatus = ldGetUrlVars()['login']; 13 14 if( loginStatus == 'failed' ) { 15 openLoginModal(); 16 } 17 } 18 19 if( typeof ldGetUrlVars()['ld-topic-page'] !== 'undefined' ) { 20 21 var topicPage = ldGetUrlVars()['ld-topic-page']; 22 var topicIds = topicPage.split('-'); 23 var topicId = Object.values(topicIds)[0]; 24 25 var lesson = $('#ld-expand-' + topicId); 26 var button = $(lesson).find('.ld-expand-button'); 27 28 ld_expand_element( button ); 29 30 $('html, body').animate({ 31 scrollTop: ( $(lesson).offset().top ) 32 }, 500 ); 33 34 } 35 36 $('body').on('click', 'a[href="#login"]', function(e) { 37 e.preventDefault(); 38 openLoginModal(); 39 }); 40 41 42 $('body').on('click', '.ld-modal-closer', function(e) { 43 e.preventDefault(); 44 closeLoginModal(); 45 }); 46 47 $('body').on('click', '#ld-comments-post-button', function(e) { 48 $(this).addClass('ld-open'); 49 $('#ld-comments-form').removeClass('ld-collapsed'); 50 $('textarea#comment').focus(); 51 }); 52 53 // Close modal if clicking away 54 /* 55 $('body').on('click', function(e) { 56 if ($('.learndash-wrapper').hasClass('ld-modal-open')) { 57 if ( ! $(e.target).parents('.ld-modal').length && (! $(e.target).is('a'))) { 58 closeLoginModal(); 59 } 60 } 61 }); 62 */ 63 64 // Close modal on Esc key 65 $(document).keyup(function(e) { 66 if (e.keyCode === 27) { 67 closeLoginModal(); 68 } 69 }); 70 71 $( '.learndash-wrapper' ).on( 'click', 'a.user_statistic', show_user_statistic ); 72 73 focusMobileCheck(); 74 75 $('body').on('click', '.ld-focus-sidebar-trigger', function(e) { 76 if ($('.ld-focus').hasClass('ld-focus-sidebar-collapsed')) { 77 openFocusSidebar(); 78 } else { 79 closeFocusSidebar(); 80 } 81 }); 82 83 $('body').on('click', '.ld-mobile-nav a', function(e) { 84 e.preventDefault(); 85 if ($('.ld-focus').hasClass('ld-focus-sidebar-collapsed')) { 86 openFocusSidebar(); 87 } else { 88 closeFocusSidebar(); 89 } 90 91 }); 92 93 $('.ld-js-register-account').click(function(e) { 94 95 e.preventDefault(); 96 97 $('.ld-login-modal-register .ld-modal-text').slideUp('slow'); 98 $('.ld-login-modal-register .ld-alert').slideUp('slow'); 99 $(this).slideUp('slow', function() { 100 101 $('#ld-user-register').slideDown('slow'); 102 }); 103 104 }); 105 106 var windowWidth = $(window).width(); 107 108 $(window).on('orientationchange', function() { 109 windowWidth = $(window).width(); 110 }); 111 112 $(window).on('resize', function() { 113 if ($(this).width() !== windowWidth) { 114 setTimeout(function() { 115 focusMobileCheck(); 116 }, 50); 117 } 118 }); 119 120 if( $('.ld-course-status-content').length ) { 121 var tallest = 0; 122 123 $('.ld-course-status-content').each(function() { 124 if($(this).height() > tallest){ 125 tallest = $(this).height(); 126 } 127 }); 128 129 $('.ld-course-status-content').height(tallest); 130 131 } 132 133 function focusMobileCheck() { 134 if ($(window).width() < 768) { 135 closeFocusSidebar(); 136 } else { 137 openFocusSidebar(); 138 } 139 } 140 141 function closeFocusSidebar() { 142 $('.ld-focus').addClass('ld-focus-sidebar-collapsed'); 143 $('.ld-mobile-nav').removeClass('expanded'); 144 positionTooltips(); 145 } 146 147 function openFocusSidebar() { 148 $('.ld-focus').removeClass('ld-focus-sidebar-collapsed'); 149 $('.ld-mobile-nav').addClass('expanded'); 150 positionTooltips(); 151 } 152 153 154 $('.ld-file-input' ).each( function() { 155 var $input = $( this ), 156 $label = $input.next( 'label' ), 157 labelVal = $label.html(); 158 159 $input.on( 'change', function( e ) { 160 161 var fileName = ''; 162 if( this.files && this.files.length > 1 ) 163 fileName = ( this.getAttribute( 'data-multiple-caption' ) || '' ).replace( '{count}', this.files.length ); 164 else if( e.target.value ) 165 fileName = e.target.value.split( '\\' ).pop(); 166 if( fileName ) { 167 $label.find( 'span' ).html( fileName ); 168 $label.addClass('ld-file-selected'); 169 $('#uploadfile_btn').attr( 'disabled', false ); 170 } else { 171 $label.html( labelVal ); 172 $label.removeClass('ld-file-selected'); 173 $('#uploadfile_btn').attr( 'disabled', true ); 174 } 175 }); 176 177 // Firefox bug fix 178 $input 179 .on( 'focus', function(){ $input.addClass( 'has-focus' ); }) 180 .on( 'blur', function(){ $input.removeClass( 'has-focus' ); }); 181 }); 182 183 184 $('body').on('click', '.ld-expand-button', function(e) { 185 186 e.preventDefault(); 187 188 ld_expand_element( $(this) ); 189 190 positionTooltips(); 191 192 }); 193 194 $('body').on('click', '.ld-search-prompt', function(e) { 195 196 e.preventDefault(); 197 198 $('#course_name_field').focus(); 199 200 ld_expand_element( $(this) ); 201 202 }); 203 204 function ld_expand_button_state(state, elm) { 205 var $expandText = ($(elm)[0].hasAttribute('data-ld-expand-text')) ? $(elm).attr('data-ld-expand-text') : 'Expand'; 206 var $collapseText = ($(elm)[0].hasAttribute('data-ld-collapse-text')) ? $(elm).attr('data-ld-collapse-text') : 'Collapse'; 207 208 if (state == 'collapse') { 209 $(elm).removeClass('ld-expanded'); 210 if ($collapseText !== 'false') { 211 $(elm).find('.ld-text').text($expandText); 212 } 213 } else { 214 $(elm).addClass('ld-expanded'); 215 if ($collapseText !== 'false') { 216 $(elm).find('.ld-text').text($collapseText); 217 } 218 } 219 } 220 221 function ld_expand_element( elm, collapse ) { 222 223 if(collapse === undefined) { 224 collapse = false;
225 } 226 227 // Get the button's state 228 var $expanded = $(elm).hasClass('ld-expanded'); 229 230 231 // Get the element to expand 232 if ($(elm)[0].hasAttribute('data-ld-expands')) { 233 234 var $expands = $(elm).attr('data-ld-expands'); 235 var $expandElm = $('#' + $expands); 236 var $expandsChild = $('#' + $expands).find('.ld-item-list-item-expanded'); 237 238 if ($expandsChild.length) { 239 $expandElm = $expandsChild; 240 } 241 242 var totalHeight = 0; 243 244 $expandElm.find('> *').each(function() { 245 totalHeight += $(this).outerHeight(); 246 }); 247 248 $expandElm.attr('data-height', '' + (totalHeight + 50) + ''); 249 250 // If the element expands a list 251 252 if ($('#' + $expands)[0].hasAttribute('data-ld-expand-list')) { 253 254 var $container = $('#' + $expands); 255 var innerButtons = $container.find('.ld-expand-button'); 256 if ($expanded) { 257 ld_expand_button_state('collapse', elm); 258 innerButtons.each(function() { 259 ld_expand_element($(this), true); 260 }); 261 } else { 262 ld_expand_button_state('expand', elm); 263 innerButtons.each(function() { 264 ld_expand_element($(this)); 265 }); 266 267 } 268 269 // If the element expands an item 270 271 } else if ($('#' + $expands).length) { 272 273 if ($expanded || collapse == true) { 274 ld_expand_singular_item(elm, $('#' + $expands), $expandElm); 275 } else { 276 ld_collapse_singular_item(elm, $('#' + $expands), $expandElm); 277 } 278 279 } else { 280 console.log('LearnDash: No expandable content was found'); 281 } 282 positionTooltips(); 283 } 284 285 } 286 287 function ld_expand_singular_item(elm, $containerElm, $expandElm) { 288 289 $containerElm.removeClass('ld-expanded'); 290 ld_expand_button_state('collapse', elm); 291 292 $expandElm.css({ 293 'max-height': 0 294 }); 295 } 296 297 function ld_collapse_singular_item(elm, $containerElm, $expandElm) { 298 299 $containerElm.addClass('ld-expanded'); 300 301 ld_expand_button_state('expand', elm); 302 303 $expandElm.css({ 304 'max-height': $expandElm.data('height') 305 }); 306 } 307 308 $('body').on('click', '.ld-closer', function(e) { 309 ld_expand_element( $('.ld-search-prompt'), true ); 310 }); 311 312 $('body').on('click', '.ld-tabs-navigation .ld-tab', function() { 313 var $tab = $('#' + $(this).attr('data-ld-tab')); 314 if ($tab.length) { 315 $('.ld-tabs-navigation .ld-tab.ld-active').removeClass('ld-active'); 316 $(this).addClass('ld-active'); 317 $('.ld-tabs-content .ld-tab-content.ld-visible').removeClass('ld-visible'); 318 $tab.addClass('ld-visible'); 319 } 320 positionTooltips(); 321 }); 322 323 var $tooltips = $('*[data-ld-tooltip]'); 324 325 initTooltips(); 326 327 function initTooltips() { 328 329 // Clear out old tooltips 330 331 332 if( $('#learndash-tooltips').length ) { 333 $('#learndash-tooltips').remove(); 334 $tooltips = $('*[data-ld-tooltip]'); 335 } 336 337 if ($tooltips.length) { 338 $('body').prepend('<div id="learndash-tooltips"></div>'); 339 var $ctr =1; 340 $tooltips.each(function() { 341 var anchor = $(this); 342 if (anchor.hasClass('ld-item-list-item')) { 343 anchor = anchor.find('.ld-item-title'); 344 } 345 var elementOffsets = { 346 top: anchor.offset().top, 347 left: anchor.offset().left + (anchor.outerWidth() / 2) 348 }; 349 var $content = $(this).attr('data-ld-tooltip'); 350 var $rel_id = Math.floor((Math.random() * 99999)); 351 //var $tooltip = '<span id="ld-tooltip-' + $rel_id + '" class="ld-tooltip" style="top:' + elementOffsets.top + 'px; left:' + elementOffsets.left + 'px;">' + $content + '</span>'; 352 var $tooltip = '<span id="ld-tooltip-' + $rel_id + '" class="ld-tooltip">' + $content + '</span>'; 353 $(this).attr('data-ld-tooltip-id', $rel_id); 354 $('#learndash-tooltips').append($tooltip); 355 $ctr++; 356 var $tooltip = $('#ld-tooltip-' + $rel_id); 357 $(this).hover( 358 function() { 359 $tooltip.addClass('ld-visible'); 360 }, 361 function() { 362 $tooltip.removeClass('ld-visible'); 363 } 364 ); 365 }); 366 367 $(window).on('resize', function() { 368 // Reposition tooltips after resizing 369 positionTooltips(); 370 }); 371 372 $(window).add('.ld-focus-sidebar-wrapper').on('scroll', function() { 373 // Hide tooltips so they don't persist while scrolling 374 $('.ld-visible.ld-tooltip').removeClass('ld-visible'); 375 // Reposition tooltips after scrolling 376 positionTooltips(); 377 }); 378 379 positionTooltips(); 380 } 381 } 382 383 function initLoginModal() { 384 var modal_wrapper = $('.learndash-wrapper-login-modal'); 385 if ((typeof modal_wrapper !== 'undefined') && (modal_wrapper.length)) { 386 // Move the model to be first element of the body. See LEARNDASH-3503 387 $(modal_wrapper).prependTo('body'); 388 } 389 } 390 391 function openLoginModal() { 392 var modal_wrapper = $('.learndash-wrapper-login-modal'); 393 if ((typeof modal_wrapper !== 'undefined') && ( modal_wrapper.length ) ) { 394 $(modal_wrapper).addClass('ld-modal-open'); 395 $(modal_wrapper).removeClass('ld-modal-closed'); 396 397 // Removed LEARNDASH-3867 #4 398 $('html, body').animate({ 399 scrollTop: $('.ld-modal', modal_wrapper).offset().top 400 }, 50); 401 } 402 } 403 404 function closeLoginModal() { 405 var modal_wrapper = $('.learndash-wrapper-login-modal'); 406 if ((typeof modal_wrapper !== 'undefined') && (modal_wrapper.length)) { 407 $(modal_wrapper).removeClass('ld-modal-open'); 408 $(modal_wrapper).addClass('ld-modal-closed'); 409 } 410 } 411 412 function positionTooltips() { 413 414 if ( typeof $tooltips !== 'undefined' ) { 415 setTimeout(function() { 416 417 $tooltips.each(function() { 418 var anchor = $(this); 419 var $rel_id = anchor.attr('data-ld-tooltip-id');
420 $tooltip = $('#ld-tooltip-' + $rel_id); 421 422 if (anchor.hasClass('ld-item-list-item')) { 423 //anchor = anchor.find('.ld-item-title'); 424 anchor = anchor.find('.ld-status-icon'); 425 } 426 console.log('anchor[%o]', anchor); 427 var parent_focus = jQuery(anchor).parents('.ld-focus-sidebar'); 428 console.log('parent_focus[%o]', parent_focus); 429 var left_post = anchor.offset().left + (anchor.outerWidth() + 10); 430 if (parent_focus.length) { 431 left_post = anchor.offset().left + (anchor.outerWidth() -18); 432 } 433 434 $tooltip.css({ 435 'top' : anchor.offset().top + -3, 436 //'left' : anchor.offset().left + (anchor.outerWidth() / 2), 437 'left': left_post, //anchor.offset().left + (anchor.outerWidth() +10), 438 'margin-left' : 0, 439 'margin-right' : 0 440 }).removeClass('ld-shifted-left ld-shifted-right'); 441 if ($tooltip.offset().left <= 0) { 442 $tooltip.css({ 'margin-left' : Math.abs($tooltip.offset().left) }).addClass('ld-shifted-left'); 443 } 444 var $tooltipRight = $(window).width() - ($tooltip.offset().left + $tooltip.outerWidth()); 445 if ($tooltipRight <= 0) { 446 $tooltip.css({ 'margin-right' : Math.abs($tooltipRight) }).addClass('ld-shifted-right'); 447 } 448 449 }); 450 }, 500); 451 } 452 } 453 454 455 $('body').on( 'click', '#ld-profile .ld-reset-button', function(e) { 456 457 e.preventDefault(); 458 459 var searchVars = { 460 shortcode_instance : $('#ld-profile').data('shortcode_instance') 461 }; 462 463 $('#ld-profile #ld-main-course-list').addClass('ld-loading'); 464 465 $.ajax({ 466 type: 'GET', 467 url: ajaxurl + '?action=ld30_ajax_profile_search', 468 data: searchVars, 469 success: function( response ) { 470 471 if( typeof response.data.markup !== 'undefined' ) { 472 $('#ld-profile').html( response.data.markup ); 473 } 474 475 } 476 }); 477 478 }); 479 480 $('body').on( 'submit', '.ld-item-search-fields', function(e) { 481 482 e.preventDefault(); 483 484 var searchVars = { 485 shortcode_instance : $('#ld-profile').data('shortcode_instance') 486 }; 487 488 searchVars['ld-profile-search'] = $(this).parents('.ld-item-search-wrapper').find('#course_name_field').val(); 489 490 $('#ld-profile #ld-main-course-list').addClass('ld-loading'); 491 492 $.ajax({ 493 type: 'GET', 494 url: ajaxurl + '?action=ld30_ajax_profile_search', 495 data: searchVars, 496 success: function( response ) { 497 498 if( typeof response.data.markup !== 'undefined' ) { 499 $('#ld-profile').html( response.data.markup ); 500 } 501 502 } 503 }); 504 505 }); 506 507 $('body').on( 'click', '.ld-pagination a', function(e) { 508 509 e.preventDefault(); 510 511 var linkVars = {}; 512 513 $(this).attr('href').replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { 514 linkVars[key] = value; 515 }); 516 517 linkVars.pager_results = $(this).parents('.ld-pagination').data('pager-results'); 518 519 linkVars.context = $(this).data('context'); 520 521 if( linkVars.context != 'profile' ) { 522 523 linkVars.lesson_id = $(this).data('lesson_id'); 524 linkVars.course_id = $(this).data('course_id'); 525 526 if( $('.ld-course-nav-' + linkVars.course_id ).length ) { 527 linkVars.widget_instance = $('.ld-course-nav-' + linkVars.course_id ).data('widget_instance'); 528 } 529 530 } 531 532 if( linkVars.context == 'course_topics' ) { 533 $('#ld-topic-list-' + linkVars.lesson_id ).addClass('ld-loading'); 534 $('#ld-nav-content-list-' + linkVars.lesson_id ).addClass('ld-loading'); 535 } 536 537 if( linkVars.context == 'course_lessons' ) { 538 $('#ld-item-list-' + linkVars.course_id ).addClass('ld-loading'); 539 $('#ld-lesson-list-' + linkVars.course_id ).addClass('ld-loading'); 540 } 541 542 if( linkVars.context == 'profile' ) { 543 $('#ld-profile #ld-main-course-list').addClass('ld-loading'); 544 linkVars.shortcode_instance = $('#ld-profile').data('shortcode_instance'); 545 } 546 547 if( linkVars.context == 'course_content_shortcode' ) { 548 $('.ld-course-content-' + linkVars.course_id ).addClass('ld-loading'); 549 linkVars.shortcode_instance = $('.ld-course-content-' + linkVars.course_id ).data('shortcode_instance'); 550 } 551 552 if( linkVars.context == 'course_info_courses' ) { 553 $('.ld-user-status').addClass('ld-loading'); 554 linkVars.shortcode_instance = $('.ld-user-status').data('shortcode-atts'); 555 console.log(linkVars); 556 } 557 558 $.ajax({ 559 type: 'GET', 560 url: ajaxurl + '?action=ld30_ajax_pager', 561 data: linkVars, 562 success: function( response ) { 563 564 // If we have a course listing, update 565 566 if( linkVars.context == 'course_topics' ) { 567 568 if( $('#ld-topic-list-' + linkVars.lesson_id ).length ) { 569 570 if( typeof response.data.topics !== 'undefined' ) { 571 $('#ld-topic-list-' + linkVars.lesson_id ).html( response.data.topics ); 572 } 573 574 if( typeof response.data.pager !== 'undefined' ) { 575 $('#ld-expand-' + linkVars.lesson_id ).find('.ld-table-list-footer').html( response.data.pager ); 576 } 577 578 learndashSetMaxHeight( $('.ld-lesson-item-' + linkVars.lesson_id ).find('.ld-item-list-item-expanded') ); 579 580 $('#ld-topic-list-' + linkVars.lesson_id ).removeClass('ld-loading'); 581 582 } 583 584 if( $('#ld-nav-content-list-' + linkVars.lesson_id ).length ) { 585 586 587 if( typeof response.data.nav_topics !== 'undefined' ) { 588 $('#ld-nav-content-list-' + linkVars.lesson_id ).find('.ld-table-list-items' ).html( response.data.topics ); 589 } 590 591 if( typeof response.data.pager !== 'undefined' ) { 592 $('#ld-nav-content-list-' + linkVars.lesson_id ).find('.ld-table-list-footer' ).html( response.data.pager ); 593 } 594 595 $('#ld-nav-content-list-' + linkVars.lesson_id ).removeClass('ld-loading'); 596 597 } 598 599 } 600 601 if( linkVars.context == 'course_lessons') { 602 603 if( $('#ld-item-list-' + linkVars.course_id ).length ) { 604 605 if( typeof response.data.lessons !== 'undefined' ) { 606 $( '#ld-item-list-' + linkVars.course_id ).html( response.data.lessons ).removeClass('ld-loading'); 607 } 608 609 } 610 611 if( $( '#ld-lesson-list-' + linkVars.course_id ).length ) { 612 613 if( typeof response.data.nav_lessons !== 'undefined' ) { 614 $( '#ld-lesson-list-' + linkVars.course_id ).html( response.data.nav_lessons ).removeClass('ld-loading'); 615 } 616 617 } 618 619 } 620 621 if( linkVars.context == 'profile' ) { 622 623 if( typeof response.data.markup !== 'undefined' ) { 624 $('#ld-profile').html( response.data.markup ); 625 } 626 627 } 628 629 if( linkVars.context == 'course_content_shortcode' ) { 630 631 if( typeof response.data.markup !== 'undefined' ) { 632 $('#learndash_post_' + linkVars.course_id ).replaceWith( response.data.markup ); 633 } 634 635 } 636 637 if( linkVars.context == 'course_info_courses' ) { 638 639 if( typeof response.data.markup !== 'undefined' ) { 640 $('.ld-user-status').replaceWith( response.data.markup ); 641 } 642 643 } 644 645 $('body').trigger( 'ld_has_paginated' ); 646 647 initTooltips(); 648 649 } 650 }); 651 652 }); 653 654 if( $('#learndash_timer').length ) { 655 656 var timer_el = jQuery( '#learndash_timer' ); 657 var timer_seconds = timer_el.attr('data-timer-seconds'); 658 var timer_button_el = jQuery( timer_el.attr('data-button') ); 659 660 var cookie_key = timer_el.attr('data-cookie-key'); 661 662 if (typeof cookie_key !== 'undefined') { 663 var cookie_name = 'learndash_timer_cookie_'+cookie_key; 664 } else { 665 var cookie_name = 'learndash_timer_cookie'; 666 } 667 668 cookie_timer_seconds = jQuery.cookie(cookie_name); 669 670 if (typeof cookie_timer_seconds !== 'undefined') { 671 timer_seconds = parseInt( cookie_timer_seconds ); 672 } 673 674 if ( timer_seconds == 0 ) { 675 $(timer_el).hide(); 676 } 677 678 $(timer_button_el).on( 'learndash-time-finished', function() { 679 $(timer_el).hide(); 680 }); 681 682 } 683
684 $(document).on( 'learndash_video_disable_assets', function( event, status ) { 685 686 if ( typeof learndash_video_data == 'undefined' ) { 687 return false; 688 } 689 690 if (learndash_video_data.videos_shown == 'BEFORE' ) { 691 692 if ( status == true ) { 693 $('.ld-lesson-topic-list').hide(); 694 $('.ld-lesson-navigation').find( '#ld-nav-content-list-' + ldVars.postID ).addClass('user_has_no_access'); 695 $('.ld-quiz-list').hide(); 696 } else { 697 $('.ld-lesson-topic-list').slideDown(); 698 $('.ld-quiz-list').slideDown(); 699 $('.ld-lesson-navigation').find( '#ld-nav-content-list-' + ldVars.postID ).removeClass('user_has_no_access'); 700 } 701 } 702 703 }); 704 705 $('.learndash-wrapper').on( 'click', '.wpProQuiz_questionListItem input[type="radio"]', function(e) { 706 707 $(this).parents('.wpProQuiz_questionList').find('label').removeClass('is-selected'); 708 $(this).parents('label').addClass('is-selected'); 709 710 }); 711 712 function show_user_statistic( e ) { 713 714 e.preventDefault(); 715 716 var refId = jQuery(this).data('ref_id'); 717 var quizId = jQuery(this).data('quiz_id'); 718 var userId = jQuery(this).data('user_id'); 719 var statistic_nonce = jQuery(this).data('statistic_nonce'); 720 var post_data = { 721 'action': 'wp_pro_quiz_admin_ajax', 722 'func': 'statisticLoadUser', 723 'data': { 724 'quizId': quizId, 725 'userId': userId, 726 'refId': refId, 727 'statistic_nonce': statistic_nonce, 728 'avg': 0 729 } 730 } 731 732 jQuery('#wpProQuiz_user_overlay, #wpProQuiz_loadUserData').show(); 733 var content = jQuery('#wpProQuiz_user_content').hide(); 734 735 jQuery.ajax({ 736 type: "POST", 737 url: ajaxurl, 738 dataType: "json", 739 cache: false, 740 data: post_data, 741 error: function(jqXHR, textStatus, errorThrown ) { 742 }, 743 success: function(reply_data) { 744 745 if ( typeof reply_data.html !== 'undefined' ) { 746 747 content.html(reply_data.html); 748 jQuery('#wpProQuiz_user_content').show(); 749 750 jQuery('#wpProQuiz_loadUserData').hide(); 751 752 content.find('.statistic_data').click(function() { 753 jQuery(this).parents('tr').next().toggle('fast'); 754 755 return false; 756 }); 757 } 758 } 759 }); 760 761 jQuery('#wpProQuiz_overlay_close').click(function() { 762 jQuery('#wpProQuiz_user_overlay').hide(); 763 }); 764 } 765 766 function learndashSetMaxHeight( elm ) { 767 768 var totalHeight = 0; 769 770 elm.find('> *').each(function() { 771 totalHeight += $(this).outerHeight(); 772 }); 773 774 elm.attr('data-height', '' + (totalHeight + 50) + ''); 775 776 elm.css({ 777 'max-height': totalHeight + 50 778 }); 779 } 780 781}); 782 783function ldGetUrlVars() { 784 785 var vars = {}; 786 var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { 787 vars[key] = value; 788 }); 789 790 return vars; 791 792}
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.