1function sortTableDate() { 2 3 $(".table_sort-date tbody tr").each(function() { 4 var dateArray = $("td:nth-child(2)", this).text().split("/"); 5 var convertYear = Number(dateArray[2]); 6 var calcYear = convertYear + 2000; 7 8 var d = new Date(calcYear, dateArray[1] - 1, dateArray[0]); 9 var time = d.getTime(); 10 $("td:nth-child(2)", this).attr('data-date', time); 11 12 }); 13 14 15 $('.table_sort-date tbody tr').sort(function(a, b) { 16 17 var A = $(a).children('td').eq(1).attr("data-date"); 18 var B = $(b).children('td').eq(1).attr("data-date"); 19 20 if (A > B) { 21 return -1; 22 } 23 24 if (A < B) { 25 return 1; 26 } 27 28 return 0; 29 30 31 }).each(function() { 32 $(".table_sort-date tbody").prepend(this); 33 }); 34} 35 36function sortTableAlpha() { 37 var rows = $('.table_sort-alpha tbody tr'); 38 39 rows.sort(function(a, b) { 40 41 var A = $(a).children('td').eq(0).text().toUpperCase(); 42 var B = $(b).children('td').eq(0).text().toUpperCase(); 43 var A = A.trim(); 44 var B = B.trim(); 45 46 if (A < B) { 47 return -1; 48 } 49 50 if (A > B) { 51 return 1; 52 } 53 54 return 0; 55 56 }); 57 58 $.each(rows, function(index, row) { 59 $('.table_sort-alpha').children('tbody').append(row); 60 }); 61} 62 63function sortTableLvl() { 64 var rows = $('.table_sort-level tbody tr'); 65 66 rows.sort(function(a, b) { 67 68 var A = $(a).children('td').eq(1).text().toUpperCase(); 69 var B = $(b).children('td').eq(1).text().toUpperCase(); 70 71 if (A < B) { 72 return -1; 73 } 74 75 if (A > B) { 76 return 1; 77 } 78 79 return 0; 80 81 }); 82 83 $.each(rows, function(index, row) { 84 $('.table_sort-level').children('tbody').append(row); 85 }); 86} 87 88$(document).ready(function() { 89 90 sortTableAlpha(); 91 sortTableDate(); 92 sortTableLvl(); 93 94 //**********************************************************// 95 // Disabled field css fix 96 //**********************************************************// 97 98 99 // detect IE 100 /* 101 var IEversion = detectIE(); 102 103 if (IEversion !== false) { 104 var myInput=document.getElementsByClassName('.application_form_inputs'); 105 myInput.disabled=false; //First make sure it is not disabled 106 myInput.className=disabledClass; //change the class 107 myInput.disabled=true; 108 } 109 110 111 /** 112 * detect IE 113 * returns version of IE or false, if browser is not Internet Explorer 114 */ 115 /* 116 function detectIE() { 117 var ua = window.navigator.userAgent; 118 119 // test values 120 // IE 10 121 //ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)'; 122 // IE 11 123 //ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko'; 124 // IE 12 / Spartan 125 //ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0'; 126 127 var msie = ua.indexOf('MSIE '); 128 if (msie > 0) { 129 // IE 10 or older => return version number 130 return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); 131 } 132 133 var trident = ua.indexOf('Trident/'); 134 if (trident > 0) { 135 // IE 11 => return version number 136 var rv = ua.indexOf('rv:'); 137 return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); 138 } 139 140 var edge = ua.indexOf('Edge/'); 141 if (edge > 0) { 142 // IE 12 => return version number 143 return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); 144 } 145 146 // other browser 147 return false; 148 } 149*/ 150 151$('#main-banner').owlCarousel({ 152 autoplay: true, 153 center: true, 154 loop: true, 155 autoWidth: true, 156 autoplayHoverPause: true, 157 dots: false, 158 nav: false, 159 // itemsCustom: [ 160 // [0,3] 161 // ], 162 //responsiveClass: true, 163 responsive: { 164 0: { 165 items: 1, 166 autoWidth: false 167 }, 168 768: { 169 items: 3, 170 autoWidth: true 171 } 172 } 173}); 174 var carousel = $("#owl-demo"); 175 carousel.owlCarousel({ 176 center: true, 177 autoplay: true, 178 itemsScaleUp: true, 179 loop: true, 180 navigationText: ["", ""], 181 stopOnHover: true, 182 responsiveClass: true, 183 lazyLoad: true, 184 responsive: { 185 0: { 186 items: 1, 187 nav: true 188 }, 189 480: { 190 items: 3, 191 nav: false 192 }, 193 768: { 194 items: 4, 195 nav: false 196 }, 197 980: { 198 items: 5, 199 nav: true, 200 loop: false 201 } 202 }, 203 navigation: false 204 });
205 206 207 // OLD FOOTER CAROUSEL FOR UNEVEN LOGO'S 208 // ===================================== 209 // var carousel = $("#footer-banner"); 210 // carousel.owlCarousel({ 211 // autoplay:true, 212 // stopOnHover:true, 213 // nav:false, 214 // autoWidth:true, 215 // loop:true, 216 // itemsScaleUp:true, 217 // margin:10, 218 // margin:50, 219 // responsive:{ 220 // 0:{ 221 // items:1 222 // }, 223 // 600:{ 224 // items:3 225 // }, 226 // 1000:{ 227 // items:5 228 // } 229 // } 230 // }); 231 232 var carousel = $("#footer-banner"); 233 carousel.owlCarousel({ 234 autoplay: true, 235 stopOnHover: true, 236 nav: true, 237 autoWidth: true, 238 loop: true, 239 margin: 50, 240 dots: false, 241 navText: ["Previous", "Next"], 242 responsive: { 243 0: { 244 items: 3, 245 margin: 20 246 }, 247 767: { 248 items: 3, 249 margin: 20 250 }, 251 992: { 252 items: 4, 253 margin: 30 254 }, 255 1200: { 256 items: 5, 257 margin: 50 258 } 259 } 260 }); 261 262 var carousel = $("#orange-banner-carousel"); 263 carousel.owlCarousel({ 264 autoplay: true, 265 items: 1, 266 loop: true, 267 nav: true, 268 stopOnHover: true, 269 singleItem: true, 270 singleItem: true, 271 lazyLoad: true, 272 autoHeight: true, 273 transitionStyle: "fade", 274 margin: 0 275 }); 276 277 $("#superLearnersVideo").owlCarousel({ 278 margin: 16, 279 center: true, 280 autoPlay: true, 281 lazyLoad: true, 282 dots: false, 283 pagination: false, 284 paginationNumbers: false 285 }); 286 287 $("#faceVideo").owlCarousel({ 288 margin: 16, 289 center: false, 290 autoPlay: true, 291 lazyLoad: true, 292 dots: false, 293 pagination: false, 294 paginationNumbers: false 295 }); 296 297 $("#demographicVideo").owlCarousel({ 298 margin: 16, 299 autoPlay: true, 300 dots: true, 301 pagination: false, 302 lazyLoad: true, 303 paginationNumbers: false, 304 nav: true, 305 items: 6, 306 loop: false, 307 responsive: { 308 0: { 309 items: 2 310 }, 311 767: { 312 items: 3 313 }, 314 992: { 315 items: 4 316 }, 317 1200: { 318 items: 6 319 } 320 } 321 }); 322 323 // var carousel = $("#demographicsVideo"); 324 // carousel.owlCarousel({ 325 // //autoplay:true, 326 // stopOnHover:true, 327 // loop:true, 328 // nav:false, 329 // dots:false, 330 // scrollPerPage:true, 331 // responsive:{ 332 // 0:{ 333 // items:1 334 // }, 335 // 600:{ 336 // items:3 337 // }, 338 // 1000:{ 339 // items:5 340 // } 341 // } 342 // }); 343 344}); 345 346$(function() { 347 348 //**********************************************************// 349 // -2 - Nav arrows 350 //**********************************************************// 351 352 if ($(window).width() < 740) { 353 $(".second-nav-next").show(); 354 } else { 355 $(".second-nav-next").hide(); 356 } 357 358 359 var waitForFinalEvent = (function() { 360 var timers = {}; 361 return function(callback, ms, uniqueId) { 362 if (!uniqueId) { 363 uniqueId = "Don't call this twice without a uniqueId"; 364 } 365 if (timers[uniqueId]) { 366 clearTimeout(timers[uniqueId]); 367 } 368 timers[uniqueId] = setTimeout(callback, ms); 369 }; 370 })(); 371 372 $(window).on('resize', function() { 373 waitForFinalEvent(function() { 374 if ($(window).width() < 730) { 375 if ($(".second_nav_container").length != 0) { 376 $(".second-nav-prev").show(); 377 $(".second-nav-next").show(); 378 } else { 379 $(".second-nav-prev").hide(); 380 $(".second-nav-next").hide(); 381 } 382 } else { 383 $(".second-nav-prev").hide(); 384 $(".second-nav-next").hide(); 385 } 386 }); 387 });
388 389 // var maxScrollLeft = $(".second_nav_wrapper").scrollWidth - $(".second_nav_wrapper").clientWidth; 390 391 // $(".second_nav_wrapper").scroll(function() { 392 393 // if($(".second_nav_wrapper").scrollLeft() == 0){ 394 // $( ".second-nav-prev" ).hide(); 395 // } else { 396 // $( ".second-nav-prev" ).show(); 397 // } 398 399 // if($(".second_nav_wrapper").scrollLeft() == maxScrollLeft){ 400 // $( ".second-nav-prev" ).hide(); 401 // } else { 402 // $( ".second-nav-prev" ).show(); 403 // } 404 // }); 405 406 407 //**********************************************************// 408 // -1 - Header Nav Dropdowns 409 //**********************************************************// 410 411 $("#about_us_dropdown, #about_us_dropdown, #jobs_dropdown").hide(); 412 413 $("#about_us_nav_item ,#about_us_dropdown").mouseover(function() { 414 $("#about_us_dropdown").show(); 415 $("#about_us_nav_item h6").css("background-color", "#233f56"); 416 }); 417 $("#about_us_nav_item, #about_us_dropdown").mouseleave(function() { 418 $("#about_us_dropdown").hide(); 419 $("#about_us_nav_item h6").css("background-color", "transparent"); 420 }); 421 422 $("#news_nav_item, #news_events_dropdown").mouseover(function() { 423 $("#news_events_dropdown").show(); 424 $("#news_nav_item h6").css("background-color", "#233f56"); 425 }); 426 $("#news_nav_item, #news_events_dropdown").mouseleave(function() { 427 $("#news_events_dropdown").hide(); 428 $("#news_nav_item h6").css("background-color", "transparent"); 429 }); 430 431 $("#jobs_nav_item, #jobs_dropdown").mouseover(function() { 432 $("#jobs_dropdown").show(); 433 $("#jobs_nav_item h6").css("background-color", "#233f56"); 434 }); 435 $("#jobs_nav_item, #jobs_dropdown").mouseleave(function() { 436 $("#jobs_dropdown").hide(); 437 $("#jobs_nav_item h6").css("background-color", "transparent"); 438 }); 439 440 //**********************************************************// 441 // 0 - Sticky Navigation 442 //**********************************************************// 443 444 //**********************************************************// 445 // 0.1 - Activate Mobile Navigation 446 //**********************************************************// 447 if ($(window).width() < 767) { 448 $(".mp-pusher-inactive").addClass("mp-pusher"); 449 $('.mp-pusher-inactive').attr('id', 'mp-pusher'); 450 } else { 451 $(".mp-pusher-inactive").removeClass("mp-pusher"); 452 $('.mp-pusher-inactive').removeAttr('id', 'mp-pusher'); 453 } 454 455 $(window).on('resize', function() { 456 457 if ($(window).width() < 767) { 458 $(".mp-pusher-inactive").addClass("mp-pusher"); 459 $('.mp-pusher-inactive').attr('id', 'mp-pusher'); 460 } else { 461 $(".mp-pusher-inactive").removeClass("mp-pusher"); 462 $('.mp-pusher-inactive').removeAttr('id', 'mp-pusher'); 463 } 464 }); 465 466 //**********************************************************// 467 // 0.2 - Animate Navigation 468 //**********************************************************// 469 var fixed = false; 470 var headerHeight = $(".scroller-inner").height(); 471 var accessibilityHeight = $("#accessibility-nav").outerHeight(); 472 var logocontainerHeight = $(".header").outerHeight(); 473 var redbarHeight = $("#main-nav").height(); 474 475 if ($(window).width() > 767) { 476 477 if ($(this).scrollTop() > logocontainerHeight + accessibilityHeight) { 478 if (!fixed) { 479 fixed = true; 480 $('#main-nav').css({ position: 'fixed', top: '0' }); 481 $('.second-nav').css({ position: 'fixed', left: '0', right: '0' }); 482 $('.second-nav').css('top', redbarHeight); 483 $('.scroller-inner').css('paddingBottom', redbarHeight); 484 } 485 } else { 486 if (fixed) { 487 fixed = false; 488 $('#main-nav').css({ position: 'relative', top: 'auto' }); 489 $('.second-nav').css({ position: 'relative', left: 'auto', right: 'auto' });
490 $('.second-nav').css('top', 0); 491 $('.scroller-inner').css('paddingBottom', 0); 492 } 493 } 494 } else { 495 $(".mp-pusher-inactive").addClass("mp-pusher"); 496 $('.mp-pusher-inactive').attr('id', 'mp-pusher'); 497 } 498 499 function CheckSize() { 500 if ($(window).width() > 767) { 501 502 if ($(this).scrollTop() > logocontainerHeight + accessibilityHeight) { 503 if (!fixed) { 504 fixed = true; 505 $('#main-nav').css({ position: 'fixed', top: '0' }); 506 $('.second-nav').css({ position: 'fixed', left: '0', right: '0' }); 507 $('.second-nav').css('top', redbarHeight); 508 $('.scroller-inner').css('paddingBottom', redbarHeight); 509 } 510 } else { 511 if (fixed) { 512 fixed = false; 513 $('#main-nav').css({ position: 'relative', top: 'auto' }); 514 $('.second-nav').css({ position: 'relative', left: 'auto', right: 'auto' }); 515 $('.second-nav').css('top', 0); 516 $('.scroller-inner').css('paddingBottom', 0); 517 } 518 } 519 } else { 520 $(".mp-pusher-inactive").addClass("mp-pusher"); 521 $('.mp-pusher-inactive').attr('id', 'mp-pusher'); 522 $('#main-nav').css({ display: 'none' }); 523 } 524 } 525 526 $(document).scroll(function() { 527 CheckSize(); 528 }); 529 530 $(window).on('resize', function() { 531 if ($(window).width() > 767) { 532 $('.scroller-inner').css('paddingBottom', 0); 533 } 534 }); 535 536 537 538 //**********************************************************// 539 // 1 - HomePage studen Animation - Image Hover 540 //**********************************************************// 541 542 $(".banner-students img").mouseover(function() { 543 $(this).animate({ "bottom": "-20px" }, 300, 'linear'); 544 var buttonVal = $(this).attr('class'); 545 var color = $(this).attr('data'); 546 $(".second_nav_container li h6[data='" + buttonVal + "']").addClass('hover-' + color); 547 }); 548 549 $(".banner-students img").mouseout(function() {
550 $(this).animate({ "bottom": "-174px" }, 300, 'linear'); 551 var buttonVal = $(this).attr('class'); 552 $(".second_nav_container li h6[data='" + buttonVal + "']").removeClass(); 553 }); 554 555 556 //**********************************************************// 557 // 1.1 HomePage studen Animation - Nav Hover 558 //**********************************************************// 559 560 $(".second_nav_container li h6").mouseover(function() { 561 var current = $(this).attr('data'); 562 //var pos = $(".banner-students img." + current).position(); 563 //if (pos.bottom <= -113 ){ 564 $(".banner-students img." + current).animate({ "bottom": "-20px" }, 300, 'linear'); 565 //} 566 }); 567 568 $(".second_nav_container li h6").mouseout(function() { 569 var current = $(this).attr('data'); 570 $(".banner-students img." + current).animate({ "bottom": "-174px" }, 300, 'linear'); 571 }); 572 573 574 //**********************************************************// 575 // 2 - Course Page - Collapse 576 //**********************************************************// 577 578 $('.courseHeading').click(function(e) { 579 if ($(this).find('h5').hasClass('active')) { 580 // $(this).children('h5').removeClass('active'); 581 // $(this).children('ul').children('li').slideUp(); 582 e.stopPropagation(); 583 } else { 584 if (!$(this).hasClass('subHeading')) { 585 $('.courseHeading').children('ul').children('li').slideUp(); 586 $('.courseHeading').children('h5').removeClass('active'); 587 } 588 $(this).children('.courseHeading > h5').addClass('active').children('li').slideDown(); 589 $(this).children('ul').children('li').slideDown(); 590 e.stopPropagation(); 591 } 592 }); 593 594 595 //**********************************************************// 596 // 3 - Video Page - 597 //**********************************************************// 598 599 function getId(url) { 600 var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/; 601 var match = url.match(regExp); 602 if (match && match[2].length == 11) { 603 return match[2]; 604 } else { 605 return 'error'; 606 } 607 } 608 609 $("#video-thumbnail a").click(function(e) { 610 e.preventDefault(); 611 $('.videoWrapper').empty(); 612 $('.videoTextMoreInfo').empty(); 613 var videoText = $(this).data("video-text"); 614 var videoLink = $(this).data("video-link"); 615 var myId = $(this).attr('href'); 616 myId = getId(myId); 617 var newVid = '<iframe src="//www.youtube.com/embed/' + myId + '" frameborder="0" allowfullscreen></iframe>'; 618 var newText = '<h4><a href="' + videoLink + '">' + videoText + '</a></h4>'; 619 620 $('.videoWrapper').append(newVid); 621 if (videoLink) { 622 $('.videoTextMoreInfo').append(newText); 623 } 624 625 $('html, body').animate({ 626 scrollTop: $(".videoWrapper").offset().top 627 }, 1500); 628 }) 629 630 631 //**********************************************************// 632 // 4 - superlearner page - carousel container position 633 //**********************************************************// 634 635 /* 636 function targetDiv(div) { 637 var body_size = $('body').width(); 638 console.log = (body_size); 639 var column = $("#video-thumbnail .col-xs-12").width(); 640 var videoContainer = $(div).width(); 641 var stage = $('.owl-stage').width(); 642 var img = $('.item').width(); 643 var imgCount = $( div + 'img' ).length; 644 645 var widthVal = column - 12; 646 var imgVal = (img + 16) * imgCount; 647 imgVal = (imgVal - 16); 648 var newSum = (widthVal - imgVal) / 2; 649 $( div +'.owl-stage' ).css( { "margin-left" : newSum+"px"} ); 650 651 } 652 653 $( document ).ready(function() { 654 targetDiv( '#superLearnersVideo ' ); 655 targetDiv( '#faceVideo ' ); 656 }) 657 658 var resizeTimer; 659 $(window).resize(function() { 660 661 clearTimeout(resizeTimer); 662 663 resizeTimer = setTimeout(function() { 664 665 targetDiv( '#superLearnersVideo ' ); 666 targetDiv( '#faceVideo ' ); 667 668 669 }, 200); 670 671 });
672 */ 673 674 //**********************************************************// 675 // academies tab, qNav 676 //**********************************************************// 677 $("#brief .academy-tabs li, #qNav li, .academy-tabs .panel-title").click(function() { 678 $("#brief .academy-tabs li, #qNav li").removeClass('active-tab'); 679 $(this).addClass('active-tab'); 680 681 var value = $(this).attr('data-id'); 682 var arr = [1, 2, 3, 4, 5]; 683 $.each(arr, function(index, value) { 684 $('.data-tab-' + value).hide(); 685 }); 686 $('.data-tab-' + value).show(); 687 }); 688 689 //**********************************************************// 690 // our campus tab 691 //**********************************************************// 692 //$( "#campus_info_collapse > div > div > div" ).click(function() { 693 // $( "#campus_info_collapse > div > div > div" ).removeClass('active-tab'); 694 $("#campus_info_collapse li").click(function() { 695 $("#campus_info_collapse li").removeClass('active-tab'); 696 $(this).addClass('active-tab'); 697 698 var value = $(this).attr('data-id'); 699 var arr = [1, 2]; 700 $.each(arr, function(index, value) { 701 $('.data-tab-' + value).hide(); 702 }); 703 $('.data-tab-' + value).show(); 704 }); 705 706 707 //**********************************************************// 708 // 5 toggles 709 //**********************************************************// 710 var maxToggleVal = $(".show_toggle").length; 711 var toggleCount = 0 712 713 while (maxToggleVal != toggleCount) { 714 toggleCount++; 715 $('[data-tcontent="' + toggleCount + '"]').hide(); 716 $('[data-tcontent="1"]').show(); 717 $('#toggleMore-1').hide(); 718 $('#toggleLess-1').show(); 719 } 720 721 $(".show_toggle li").click(function() { 722 var toggle = $(this).attr('id'); 723 toggle = toggle.split('-') 724 var toggleCount = 0 725 if (toggle[0] == "toggleMore") { 726 $('[data-tcontent="' + toggle[1] + '"]').show(); 727 $('#toggleMore-' + toggle[1] + '').hide(); 728 $('#toggleLess-' + toggle[1] + '').show(); 729 } 730 if (toggle[0] == "toggleLess") { 731 $('[data-tcontent="' + toggle[1] + '"]').hide(); 732 $('#toggleMore-' + toggle[1] + '').show(); 733 $('#toggleLess-' + toggle[1] + '').hide(); 734 } 735 }); 736 737 738 739 740 // Responsive layout, resizing the items 741 /* 742 $('#carousel').carouFredSel({ 743 width: '100%', 744 items: { 745 visible: 3, 746 start: -1, 747 responsive: true, 748 easing: 'elastic', 749 infinite: true 750 }, 751 scroll: { 752 items: 1, 753 duration: 1000, 754 timeoutDuration: 3000 755 }, 756 prev: '#prev', 757 next: '#next', 758 pagination: { 759 container: '#pager', 760 deviation: 1 761 } 762 }); 763 */ 764 // console.log('lookatme'); 765 // $('[data-field="other"]').change(function() { 766 // console.log('changed'); 767 // if($('#anationality').val() === "Other") { 768 // console.log('if executed'); 769 // $('.other_container').removeClass('is-hidden'); 770 // } 771 // }); 772}); 773equalheight = function(container) { 774 775 var currentTallest = 0, 776 currentRowStart = 0, 777 rowDivs = new Array(), 778 jQueryel, 779 topPosition = 0; 780 jQuery(container).each(function() { 781 782 jQueryel = jQuery(this); 783 jQuery(jQueryel).height('auto') 784 topPostion = jQueryel.position().top; 785 786 if (currentRowStart != topPostion) { 787 for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { 788 rowDivs[currentDiv].height(currentTallest); 789 } 790 rowDivs.length = 0; // empty the array 791 currentRowStart = topPostion; 792 currentTallest = jQueryel.height(); 793 rowDivs.push(jQueryel); 794 } else { 795 rowDivs.push(jQueryel); 796 currentTallest = (currentTallest < jQueryel.height()) ? (jQueryel.height()) : (currentTallest); 797 } 798 for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { 799 rowDivs[currentDiv].height(currentTallest); 800 } 801 });
802} 803 804$(document).ready(function() { 805 $('#couser-search .display-table').css({ 'height': ($(window).height() - 120) + 'px' }); 806 equalheight('.e-outer-div .e-inner'); 807}); 808 809 810jQuery(window).resize(function() { 811 $('#couser-search .display-table').css({ 'height': ($(window).height() - 120) + 'px' }); 812 equalheight('.e-outer-div .e-inner'); 813}); 814$('.zoom-in-ico').click(function() { 815 816 setTimeout(function() { 817 equalheight('.e-outer-div .e-inner'); 818 }, 1500); 819 820}); 821var TabManager = { 822 initialize: function(parent) { 823 var tabs = parent; 824 var tabsHeight = tabs.innerHeight(); 825 826 if (tabsHeight >= 50) { 827 while (tabsHeight > 50) { 828 var children = tabs.children('li:not(:last-child)'); 829 var count = children.length; 830 831 // Create the new menu item. 832 var item = $(children[count - 1]); 833 var newMenuItem = '<a class="dropdown-item" href="' + item.children('a').attr('href') + '" data-toggle="tab">' + item.text() + '</a>'; 834 835 // Append the new menu item to the collapsed menu list. 836 tabs.find('.collapsed-tabs').prepend(newMenuItem); 837 838 // Remove the menu item from the main tab area. 839 item.remove(); 840 841 tabsHeight = tabs.innerHeight(); 842 } 843 } else { 844 var count = 0; 845 while (tabsHeight < 50 && (tabs.children('li').length > 0) && count++ < 20) { 846 var collapsed = tabs.find('.collapsed-tabs').children('a'); 847 var count = collapsed.length; 848 if (count) { 849 // Create the new tab item. 850 var item = $(collapsed[0]); 851 var newMenuItem = "<li class='nav-item'>\n<a href='" + item.attr('href') + "' class='nav-link' data-toggle='tab'>" + item.text() + "</a>\n</li>"; 852 853 // Insert the new tab item into the main tab area. 854 tabs.children('li.collapsed-menu').before(newMenuItem); 855 856 // Remove the tab item from the collapsed menu list. 857 item.remove(); 858 859 tabsHeight = tabs.innerHeight(); 860 } else { 861 break; 862 } 863 } 864 if (tabsHeight > 50) { 865 // Double chk height again. 866 TabManager.initialize(parent); 867 } 868 } 869 870 // Hide the collapsed menu list if no items are present. 871 if (!tabs.find('.collapsed-tabs').children('a').length) { 872 tabs.find('.collapsed-menu').hide(); 873 } else { 874 tabs.find('.collapsed-menu').show(); 875 } 876 } 877}; 878 879$(function() { 880 $('.main-tab .nav').each(function() { 881 var mytabs = $(this); 882 TabManager.initialize(mytabs); 883 }); 884 885 $(window).resize(function() { 886 $('.main-tab .nav').each(function() { 887 var mytabs = $(this); 888 TabManager.initialize(mytabs); 889 }); 890 }); 891}); 892$('.searchToggler').click(function() { 893 $('.inner-page-course-filter .search-row').slideToggle(); 894 $(this).toggleClass('isActive'); 895});
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.