I know there are a lot of ways to do a show hide in jquery, but I am just wondering why is below not working. I am getting [object Object] as an alert, when trying to debug for \[code\]alert($("div.$(this).attr('class')"))\[/code\]My Script goes like below:\[code\] $(".blocks").hide(); $("div.$(this).attr('class')").show();\[/code\]Any Ideas, how to fix this, or make sure that \[code\]alert($("div.$(this).attr('class')"))\[/code\] returns class name instead of object object.