Can I change css property when browser zoom is change without js, how to solve this overlapping while zooming
Asked
Active
Viewed 64 times
-1
-
Please post an example or demonstration on a site like jsFiddle instead of a low-resolution screenshot. – Dai Feb 07 '17 at 06:30
-
Is this for zooming in or out? Please post a fiddle as the link you have attached is of low quality. – Sahil Dhir Feb 07 '17 at 06:32
-
Possible duplicate of [Detect page zoom change with jQuery in Safari](http://stackoverflow.com/questions/6163174/detect-page-zoom-change-with-jquery-in-safari) – kawadhiya21 Feb 07 '17 at 06:39
1 Answers
0
try this:
var zoom = document.documentElement.clientWidth / window.innerWidth;
$(window).resize(function() {
var zoomNew = document.documentElement.clientWidth / window.innerWidth;
if (zoom != zoomNew) {
$("p").css("background-color", "yellow");
zoom = zoomNew
}
});

Em Bryo
- 63
- 1
- 5