Source: https://stackoverflow.com/questions/13509669/find-out-if-a-variable-is-in-an-array
1 2 |
var bpMobile = ['small', 'medium']; var bpDesktop = ['large', 'xlarge', 'xxlarge']; |
1 2 3 4 5 |
if($.inArray(Foundation.MediaQuery.current, bpMobile) != -1){ alert('Mobile!'); } else { alert('Desktop!'); } |