Skip to content

Instantly share code, notes, and snippets.

@keithcollins
Last active December 17, 2015 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keithcollins/5572890 to your computer and use it in GitHub Desktop.
Save keithcollins/5572890 to your computer and use it in GitHub Desktop.
Simple rollover effects with jQuery
$('.story-box').on('mouseenter', function(){
$(this).addClass('story-box-up').find('.tcontents_title a').css('color', '#A80405');
}).on('mouseleave', function(){
$(this).removeClass('story-box-up').find('.tcontents_title a').css('color', 'black');
}).on('click mousedown', function(){
var permalink = $(this).find('.tcontents_title a').attr('href');
window.location = permalink;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment