I saw some code around the web that uses the following statement
if ($($(this)).hasClass(\"footer_default\")) {
$(\'#abc\')
.appendTo($(this))
There is no meainig of doing that.
The following code return the same:
console.log($($(this)).hasClass("footer_default"))
console.log($(this).hasClass("footer_default"))
a boolean value depenging on if the selected element has or not the class footer_default
:
.hasClass( className )Returns: Boolean
Demo: http://jsfiddle.net/IrvinDominin/aSzFn/