I have a simple if statement as such:
if ($(\'html\').hasClass(\'m320\')) { // do stuff }
This works as expected. However, I want to add
You just had some messed up parentheses in your 2nd attempt.
var $html = $("html"); if ($html.hasClass('m320') || $html.hasClass('m768')) { // do stuff }