Changed "instanceof jQuery" to "instanceof $"

Original code will break if jquery noConflict is applied, where $ and jQuery produces instance of different versions.