Janet Morrison
Janet Morrison
Sr. Academic Advisor
Division of Continuing Professional Studies
Affiliated with Communication, CPS
Get in Touch
Office:(802) 651-5826
Box 22
Education
Southern Illinois University, Doctor of Philosophy
Cape Breton University, Bachelor of Arts
University of Maine, Master of Arts

Find a Program
News Events Calendar Social Feeds
(function($){ $(document).ready(function(){ var imageRegex = /this\.src=('|")(.*)\/.*\.(jpg|png|gif|jpeg)/; var srcRegex = /src=(?:'|")((.*)\/.*\.(jpg|png|gif|jpeg))/; var speed = 160; var easing = 'easeOutCubic'; var opacity = .4; //grab all img tags $('img').each(function(){ //grab the mouseover/mouse out attrs var onMouseOver = $(this).attr('onmouseover'); var onMouseOut = $(this).attr('onmouseout'); //if it has both a mouse over and mouse out if(!!onMouseOver && !!onMouseOut){ //now check to see if the mouseout/mouseover are swapping images //they might be doing other things and we don't to affect //test for image replacement efforts if(imageRegex.test(onMouseOver) && imageRegex.test(onMouseOut)){ //remove the previous onmouse* attr $(this).removeAttr('onmouseover'); $(this).removeAttr('onmouseout'); //pre-load mouseover image var mouseOverImage = srcRegex.exec(onMouseOver); var mouseOutImage = srcRegex.exec(onMouseOut); //pre-load as soon as this listener is added so there is no flash $(''); $(this).on('mouseover',function(){ $(this).fadeTo(speed,opacity,easing,function(){ $(this).attr("src", mouseOverImage[1]).fadeTo(speed,1); }) }) //attach new event handlers for mouse over $(this).on('mouseout',function(){ $(this).fadeTo(speed,opacity,easing,function(){ $(this).attr("src", mouseOutImage[1]).fadeTo(speed,1); }) }) } } }) }); })(jQuery)