I use vwfor previous divs, now I want to set an alert if the div is moved to the left. Here's the div:
<div id='pagination'>some stuff</div>
Now its width is set to 84vw, which was calculated by the early functions. I want to warn when its margin-left is equal -84vw. I tried this in js but no luck:
if ($('#pagination').css('margin-left') == '-84vw') {
alert('you're good to go!');
}
Can someone help me with this argument? A real headache: I can't change vwto px.
source
share