I've got question about width of my element which I want to divide by number 90 If this width is multiplicity of 90 set width of this element if not go to next.
For example when window width is 1000px Element is full width 100% (lets call it (EW = element width) if EW can be divided by 90 its ok , so 1000/90 = 11,1(1) we getting window smaller we comes to 990/90 = 10 and it's ok
here EXAMPLE CODEPEN
It works when you resize slowly but when you do it fast it lost.
var windowWidth = $(window).width(),
widthNumber = windowWidth / 90;
$("#EW").css({
width: windowWidth
});
if(widthNumber % 1 != 0){
console.log("dont change")
} else {
console.log("change")
}
Someone have any idea how to solve this?