Created
September 5, 2014 14:23
-
-
Save cdracars/b0bc4bdc1b1ff35eed75 to your computer and use it in GitHub Desktop.
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
/** | |
* @file | |
* A JavaScript file for the theme. | |
*/ | |
// JavaScript should be made compatible with libraries other than jQuery by | |
// wrapping it with an "anonymous closure". See: | |
// - http://drupal.org/node/1446420 | |
// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth | |
(function ($) { | |
Drupal.behaviors.showhidetext = { | |
attach: function (context, settings) { | |
$(".listing-text").addClass('is-hidden'); | |
$(".listing .views-row").hover( | |
function() { | |
$(this).find(".listing-text").addClass('is-shown'); | |
}, function() { | |
$(this).find(".listing-text").addClass('is-hidden').removeClass('is-shown'); | |
} | |
); | |
} | |
} | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment