Skip to content

Instantly share code, notes, and snippets.

@ToQoz
Created March 27, 2014 01:31
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 ToQoz/9798049 to your computer and use it in GitHub Desktop.
Save ToQoz/9798049 to your computer and use it in GitHub Desktop.
$('.file .meta').each(function(i, node) {
var p = $(node).parents('.file'),
filename = $(node).
find('.js-selectable-text').
text().
replace(/(^\s+|\s+$)/g,'');
if (!/\.rb$/i.test(filename)) {
p.find('.data').toggle();
p.find('.image').toggle();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment