Skip to content

Instantly share code, notes, and snippets.

@jarofghosts
Created February 10, 2014 23:41
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 jarofghosts/8926515 to your computer and use it in GitHub Desktop.
Save jarofghosts/8926515 to your computer and use it in GitHub Desktop.
see just the js files in a github pr
$('[data-path]').each(function(i, el) {
var $el = $(el)
if ($el.attr('data-path').slice(-3) !== '.js') {
$el.parents('.file').hide()
}
})
@jarofghosts
Copy link
Author

to include templates:

$('[data-path]').each(function(idx, el) {
  var $el = $(el),
      path = $el.attr('data-path')

  if(path.slice(-3) !== '.js' && path.slice(-5) !== '.html') {
    $el.parents('.file').hide()
  }
})

@hedgerworkco
Copy link

@jarofghosts #1 JQUERY POWER USER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment