I need to hide a particular div on only ios devices like iPad and iPhone how can I do it.
I need to see the div on the web, android, and all except for iPhones and iPads
I need to hide a particular div on only ios devices like iPad and iPhone how can I do it.
I need to see the div on the web, android, and all except for iPhones and iPads
You can use jQuery/JavaScript to detect the device type, and then you can hide the particular div.
See here is an example Hiding DIV if using mobile browser
Use navigator.userAgent
to find the user agent string for the current browser and the extract device name from it.
const info = navigator.userAgent.match(/^[^\(]+\((\w+)/);
if(info[1]) === "Macintosh") {
// Hide the div
}
Check this link for some user agent strings.