I have a media query css block for the ipad
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
}
and for laptop and desktops @media only screen and (min-width : 1224px) { }
I have a js function which needs to have different parameters depending upon which device I am on. So lets say something like this
if(@media only screen && (min-width : 1224px)){
function operation(){
var x = 2;
}
}
if(@media only screen and (min-device-width : 768px) and (max-device-width : 1024px)){
function operation(){
var x = 7;
}
}
Conceptually thats what I am trying to achieve which is definitely incorrect syntactically
Any help will be highly appriciated