Joined May 2012
·
Posted to
JS / JQuery: Check if an Element exists
over 1 year
ago
I don't use jQuery that much anymore in favour of Angular but I think a bit better than my code from 2 years ago would be to store all your jQuery selectors to variables then check truthy value like:
var homePage = $('.homepage')
if(homePage) { //code}
Posted to
Installing mac apps in a giffy. With AlfredApp.
over 1 year
ago
Alfred Powerpack Required for all the cheapo's (like me)
Posted to
Use Sublime Text 2 as Git mergetool
over 1 year
ago
Nice
Achievements
176 Karma
11,430 Total ProTip Views

Mongoose 3
Have at least three original repos where Ruby is the dominant language

Altruist
Increase developer well-being by sharing at least 20 open source projects

Mongoose
Have at least one original repo where Ruby is the dominant language

Honey Badger
Have at least one original Node.js-specific repo

Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos

Charity
Fork and commit to someone's open source project in need

Cub
Have at least one original jQuery or Prototype open source repo
Looks good but you don't need "!== 0;" just ".length" checks this.