You could use is()
instead of hasClass()
:
if ($('html').is('.m320, .m768')) { ... }
More Related Contents:
- Add a property to a JavaScript object using a variable as the name?
- How does this JavaScript/jQuery syntax work: (function( window, undefined ) { })(window)?
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- How do I remove javascript validation from my eclipse project?
- syntax error: unexpected token
- Nested JSON objects – do I have to use arrays for everything?
- PLEASE assist me.. RE: *FORM FIELDS* I want to Hide() my "type=text box" until the Other option is chosen in the dropdown option
- How do I prevent a parent’s onclick event from firing when a child anchor is clicked?
- jQuery get specific option tag text
- How to remove “disabled” attribute using jQuery?
- Difference between jQuery `click`, `bind`, `live`, `delegate`, `trigger` and `on` functions (with an example)?
- Uncaught TypeError: Cannot read property ‘msie’ of undefined – jQuery tools
- Semicolon before self-invoking function? [duplicate]
- JavaScript equivalent of jQuery’s extend method
- Show a progress bar for downloading files using XHR2/AJAX
- Use JSONP to load an html page
- How to get a count of all checked checkboxes on a page
- Load Image from javascript
- jquery select iframe children
- getElementById returning value only for first element [closed]
- In a Chrome Extension content script, must I wait for document.ready before processing the document?
- How to find the indexes of all occurrences of an element in array?
- Setting new value for an attribute using jQuery
- jQuery Autocompletion with Eclipse Juno Java EE
- Blur event stops click event from working?
- Randomize setInterval ( How to rewrite same random after random interval)
- Javascript Input Text Masking without Plugin
- Javascript history.PushState not working?
- Convert iso timestamp to date format with Javascript?
- Disabling links to stop double-clicks in JQuery