This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* http://stackoverflow.com/questions/1000597/event-preventdefault-function-not-working-in-ie | |
*/ | |
change this: | |
e.preventDefault; | |
to this: | |
e.preventDefault ? e.preventDefault() : event.returnValue = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prevent the category widget from using the category description as the list item title attribute |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var adjustLayout = function() { | |
var current_width = $(window).width(); | |
//Get the canvas & context | |
if (current_width < 320) { | |
$('#anniversary_mobile img').addClass('invisible'); | |
} | |
else { | |
$('#anniversary_mobile img').removeClass('invisible'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* NOT BEING USED BUT GOOD REFERENCE | |
* Adding Content to the wp_after_body Hook | |
* http://www.internoetics.com/2014/01/02/add-a-hook-in-wordpress-after-the-opening-body-tag/ | |
*/ | |
function wp_after_body() { | |
do_action('wp_after_body'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach ( templateFactory::displayTemplatesHeader() as $key=>$value){ | |
?> | |
<input type="radio" class="switch-input" name="udel_theme_module_option" id="<?php echo $value['id']; ?>" value="<?php echo $value['id']; ?>" <?php echo ( $udel_theme_module_option == $value['id'] ) ? 'checked' : ''?>><label for="<?php echo $value['id']; ?>" class="switch-label <?php echo ( $udel_theme_module_option == $value['id'] ) ? 'switch-label-on' : 'switch-label-off'?>"><?php echo $value['display']; ?></label> | |
<?php | |
} | |
if ( strstr($udel_theme_module_option, 'blankHeader') ): | |
echo '<p>Header is off.</p>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Hack for Safari Mac feature detect | |
*/ | |
var isWebKit = 'WebkitAppearance' in document.documentElement.style; | |
var isMac = navigator.appVersion.indexOf("Mac")!=-1; | |
if ( (isWebKit ) && ( isMac ) ) { | |
$('.main-nav').addClass('main-nav-safari'); | |
$('body').animate({ | |
scrollTop: 0 | |
}, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* | |
* Hide site search drop down and default to sites.udel.edu/<site> search. 5/27/15 CL | |
* http://bigwilliam.com/jquery-fire-event-after-window-resize-is-completed/ | |
* https://gist.github.com/atsea/3f53c9ceca40277918da | |
*/ | |
var waitForFinalEvent = (function () { | |
var timers = {}; | |
return function (callback, ms, uniqueId) { | |
if (!uniqueId) { | |
uniqueId = "Don't call this twice without a uniqueId"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://css-tricks.com/forums/topic/delay-addclass-with-jquery/ | |
$('#ud_primary_logo_big').delay(145).queue(function(){ | |
$('#ud_primary_logo_big').fadeToggle(); | |
$('#ud_primary_logo_big').dequeue(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* UDBrand header | |
* http://stackoverflow.com/questions/21918477/jquery-toggle-opacity-on-click-using-css-animation | |
* http://stackoverflow.com/questions/18995647/jquery-make-global-variable | |
*/ | |
var current_width; | |
var pixel_ratio; | |
var logo_big; | |
$('#searchdiv').on('click', function(e){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Append date to footer | |
*/ | |
$("#date").append("© "+(new Date).getFullYear()); |