Joined May 2012
·

Greg

javascript whisperer
·
Toronto, Ontario
·
·
·

Looks good but you don't need "!== 0;" just ".length" checks this.

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}

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,390 Total ProTip Views
Interests & Skills