diff --git a/js/custom.js b/js/custom.js
index fc470b3..1cf8830 100644
--- a/js/custom.js
+++ b/js/custom.js
@@ -1,178 +1,178 @@
-jQuery(document).ready(function($) {
-
- $( ".social-vimeo > a" ).html( "DONATE" );
-
- var search = '';
- var active = false;
- $('.search').on('click',function(e){
- if($(e.target).attr('id')=='s') return;
- active = true;
- search = $(e.target).parent().html();
- $('.search').fadeOut(500,function(){
- $(this).html('
').fadeIn(500);
- $(this).addClass('search-field');
- });
- });
-
- $('body').on('click',function(e){
- if($(e.target).attr('id')=='s') return;
- if($(e.target).parent().html()== search) return;
- if(!active) return;
- active = false;
- $('.search').fadeOut(500,function(){
- $(this).html(search).fadeIn(500);
- $('.search').removeClass('search-field');
- });
- });
-
- $( "#footers" ).before( "
" );
-
- $('select[name="discipline"] option:eq(0)').prop("selected", true);
- $('select[name="major"] option:eq(0)').prop("selected", true);
-
- var isCourseSelectActive = false;
- var selectedDiscipline;
- $('select[name="discipline"]').change(function(e){
- var discipline = $(this).find(":selected").text();
- selectedDiscipline = discipline;
- $.ajax({
- type: "POST",
- url: ece_object.ajaxurl,
- data: {
- action: "ece_discipline_courses",
- discipline : discipline
- },
- success: function(response){
- if( isCourseSelectActive == true ){
- $('.course-option').remove();
- }
- $.each(response, function(i,v){
- $('select[name="course"]').append(
- $(' ', {
- 'value': v,
- 'text': v,
- 'class': "course-option"
- })
- );
- });
- $('select[name="course"]').show();
- isCourseSelectActive = true;
- eceStickyFoot();
- }, dataType: "json"
- });
- });
-
- var isCourseInfoVisible = false;
- $('select[name="course"]').change(function(e){
- if( isCourseSelectActive == false || selectedDiscipline == undefined ){
- return false;
- }
- var course = $(this).find(":selected").text();
- $.ajax({
- type: "POST",
- url: ece_object.ajaxurl,
- data: {
- action: "ece_course_info",
- discipline: selectedDiscipline,
- course: course
- },
- success: function(response){
- if( isCourseInfoVisible == true ){
- $('#ece-course-learnmore').empty();
- $('.major-requiredcourses').remove();
- }
-
- var courseInfo = response[0];
- $('#ece-course-name').text(courseInfo.discipline + " " + courseInfo.course);
- $('#ece-course-learnmore').html( $('#ece-course-learnmore').text() + ' '+courseInfo.url+' ' );
- $.each(courseInfo.majors, function(i,v){
- $('#ece-course-required ul').append(
- $(' ', {
- 'text': v.major,
- 'class': "major-requiredcourses"
- })
- );
- });
- $('#ece-course').show();
- isCourseInfoVisible = true;
- eceStickyFoot();
- }, dataType: "json"
- });
- });
-
- var isListVisible = false;
- $('select[name="major"]').change(function(e){
- var major = $(this).find(":selected").text();
- $.ajax({
- type: "POST",
- url: ece_object.ajaxurl,
- data: {
- action: "ece_major_info",
- major: major,
- },
- success: function(response){
- if( isListVisible == true ){
- $('.major-courses').remove();
- }
-
- var majorInfo = response[0];
- $('#ece-major-name').text(majorInfo.major);
- $('#ece-major-url').html(''+majorInfo.url+' ');
- $('ece-major-text').text("UConn ECE offers the following courses which lead to a major in "+majorInfo.major);
- $.each(majorInfo.courses, function(i,v){
- $('#ece-major-courses ul').append(
- $(' ', {
- 'text': v.discipline + " " + v.course,
- 'class': "major-courses"
- })
- );
- });
- $('#ece-major').show();
- isListVisible = true;
- eceStickyFoot();
- }, dataType: "json"
- });
- });
-
- // STICKY FOOTER
- // measures height of the page, and applies a class to absolute position the footer, or not.
- // on short pages, it sticks; on tall pages, it doesn't.
-
- function eceStickyFoot(){
- if (document.getElementById('page')!=null && document.getElementById('footers') !=null){
- var wrapperH = $('#page').outerHeight();
- var footerImgH = $('.footer-img').parent().outerHeight();
- var wpadminbarH = $('#wpadminbar').outerHeight();
- var ucheaderH = $('#uc-header').outerHeight();
- var footerH = $('#footers').outerHeight();
- var windowH = window.innerHeight;
- var gformH = 0;
- $('.gform_wrapper').each(function(){
- gformH = gformH + $(this).outerHeight();
- });
- windowH = windowH - wpadminbarH - ucheaderH;
- wrapperH = wrapperH + footerH + footerImgH;
- if(windowH>=wrapperH){
- $('body').addClass('sticky');
- } else {
- $('body').removeClass('sticky');
- }
- }
- }
- $(document).ready(function(){
- eceStickyFoot();
- });
- $(window).resize(function() {
- eceStickyFoot();
- });
- $(window).load(function() {
- eceStickyFoot();
- });
-
- $('.panel, .collapse').on('shown.bs.collapse', function (e) {
- eceStickyFoot();
- })
- $('.panel, .collapse').on('hidden.bs.collapse', function (e) {
- eceStickyFoot();
- })
+jQuery(document).ready(function($) {
+
+ $( ".social-vimeo > a" ).html( "DONATE" );
+
+ var search = '';
+ var active = false;
+ $('.search').on('click',function(e){
+ if($(e.target).attr('id')=='s') return;
+ active = true;
+ search = $(e.target).parent().html();
+ $('.search').fadeOut(500,function(){
+ $(this).html('').fadeIn(500);
+ $(this).addClass('search-field');
+ });
+ });
+
+ $('body').on('click',function(e){
+ if($(e.target).attr('id')=='s') return;
+ if($(e.target).parent().html()== search) return;
+ if(!active) return;
+ active = false;
+ $('.search').fadeOut(500,function(){
+ $(this).html(search).fadeIn(500);
+ $('.search').removeClass('search-field');
+ });
+ });
+
+ $( "#footers" ).before( "
" );
+
+ $('select[name="discipline"] option:eq(0)').prop("selected", true);
+ $('select[name="major"] option:eq(0)').prop("selected", true);
+
+ var isCourseSelectActive = false;
+ var selectedDiscipline;
+ $('select[name="discipline"]').change(function(e){
+ var discipline = $(this).find(":selected").text();
+ selectedDiscipline = discipline;
+ $.ajax({
+ type: "POST",
+ url: ece_object.ajaxurl,
+ data: {
+ action: "ece_discipline_courses",
+ discipline : discipline
+ },
+ success: function(response){
+ if( isCourseSelectActive == true ){
+ $('.course-option').remove();
+ }
+ $.each(response, function(i,v){
+ $('select[name="course"]').append(
+ $(' ', {
+ 'value': v,
+ 'text': v,
+ 'class': "course-option"
+ })
+ );
+ });
+ $('select[name="course"]').show();
+ isCourseSelectActive = true;
+ eceStickyFoot();
+ }, dataType: "json"
+ });
+ });
+
+ var isCourseInfoVisible = false;
+ $('select[name="course"]').change(function(e){
+ if( isCourseSelectActive == false || selectedDiscipline == undefined ){
+ return false;
+ }
+ var course = $(this).find(":selected").text();
+ $.ajax({
+ type: "POST",
+ url: ece_object.ajaxurl,
+ data: {
+ action: "ece_course_info",
+ discipline: selectedDiscipline,
+ course: course
+ },
+ success: function(response){
+ if( isCourseInfoVisible == true ){
+ $('#ece-course-learnmore').empty();
+ $('.major-requiredcourses').remove();
+ }
+
+ var courseInfo = response[0];
+ $('#ece-course-name').text(courseInfo.discipline + " " + courseInfo.course);
+ $('#ece-course-learnmore').html( $('#ece-course-learnmore').text() + ' '+courseInfo.url+' ' );
+ $.each(courseInfo.majors, function(i,v){
+ $('#ece-course-required ul').append(
+ $(' ', {
+ 'text': v.major,
+ 'class': "major-requiredcourses"
+ })
+ );
+ });
+ $('#ece-course').show();
+ isCourseInfoVisible = true;
+ eceStickyFoot();
+ }, dataType: "json"
+ });
+ });
+
+ var isListVisible = false;
+ $('select[name="major"]').change(function(e){
+ var major = $(this).find(":selected").text();
+ $.ajax({
+ type: "POST",
+ url: ece_object.ajaxurl,
+ data: {
+ action: "ece_major_info",
+ major: major,
+ },
+ success: function(response){
+ if( isListVisible == true ){
+ $('.major-courses').remove();
+ }
+
+ var majorInfo = response[0];
+ $('#ece-major-name').text(majorInfo.major);
+ $('#ece-major-url').html(''+majorInfo.url+' ');
+ $('ece-major-text').text("UConn ECE offers the following courses which lead to a major in "+majorInfo.major);
+ $.each(majorInfo.courses, function(i,v){
+ $('#ece-major-courses ul').append(
+ $(' ', {
+ 'text': v.discipline + " " + v.course,
+ 'class': "major-courses"
+ })
+ );
+ });
+ $('#ece-major').show();
+ isListVisible = true;
+ eceStickyFoot();
+ }, dataType: "json"
+ });
+ });
+
+ // STICKY FOOTER
+ // measures height of the page, and applies a class to absolute position the footer, or not.
+ // on short pages, it sticks; on tall pages, it doesn't.
+
+ function eceStickyFoot(){
+ if (document.getElementById('page')!=null && document.getElementById('footers') !=null){
+ var wrapperH = $('#page').outerHeight();
+ var footerImgH = $('.footer-img').parent().outerHeight();
+ var wpadminbarH = $('#wpadminbar').outerHeight();
+ var ucheaderH = $('#uc-header').outerHeight();
+ var footerH = $('#footers').outerHeight();
+ var windowH = window.innerHeight;
+ var gformH = 0;
+ $('.gform_wrapper').each(function(){
+ gformH = gformH + $(this).outerHeight();
+ });
+ windowH = windowH - wpadminbarH - ucheaderH;
+ wrapperH = wrapperH + footerH + footerImgH;
+ if(windowH>=wrapperH){
+ $('body').addClass('sticky');
+ } else {
+ $('body').removeClass('sticky');
+ }
+ }
+ }
+ $(document).ready(function(){
+ eceStickyFoot();
+ });
+ $(window).resize(function() {
+ eceStickyFoot();
+ });
+ $(window).load(function() {
+ eceStickyFoot();
+ });
+
+ $('.panel, .collapse').on('shown.bs.collapse', function (e) {
+ eceStickyFoot();
+ })
+ $('.panel, .collapse').on('hidden.bs.collapse', function (e) {
+ eceStickyFoot();
+ })
});
\ No newline at end of file
diff --git a/js/min/custom.min.js b/js/min/custom.min.js
index 2a1c955..4a64ab3 100644
--- a/js/min/custom.min.js
+++ b/js/min/custom.min.js
@@ -1 +1 @@
-jQuery(document).ready(function(t){t(".social-vimeo > a").html("DONATE");var e="",a=!1;t(".search").on("click",function(i){"s"!=t(i.target).attr("id")&&(a=!0,e=t(i.target).parent().html(),t(".search").fadeOut(500,function(){t(this).html('').fadeIn(500),t(this).addClass("search-field")}))}),t("body").on("click",function(i){"s"!=t(i.target).attr("id")&&t(i.target).parent().html()!=e&&a&&(a=!1,t(".search").fadeOut(500,function(){t(this).html(e).fadeIn(500),t(".search").removeClass("search-field")}))}),t("#footers").before("")});
\ No newline at end of file
+jQuery(document).ready(function(t){t(".social-vimeo > a").html("DONATE");var e="",a=!1;t(".search").on("click",function(i){"s"!=t(i.target).attr("id")&&(a=!0,e=t(i.target).parent().html(),t(".search").fadeOut(500,function(){t(this).html('').fadeIn(500),t(this).addClass("search-field")}))}),t("body").on("click",function(i){"s"!=t(i.target).attr("id")&&t(i.target).parent().html()!=e&&a&&(a=!1,t(".search").fadeOut(500,function(){t(this).html(e).fadeIn(500),t(".search").removeClass("search-field")}))}),t("#footers").before("")});
\ No newline at end of file