I have a simple if statement as such:
if ($(\'html\').hasClass(\'m320\')) { // do stuff }
This works as expected. However, I want to add
This may be another solution:
if ($('html').attr('class').match(/m320|m768/)) { // do stuff }
according to jsperf.com it's quite fast, too.