perform an if of transform: translate3d

0

I have to perform a functionality to a carousel plugin. How do I write an if that detects if a div has the style "transform" less than "translate3d (-650px, 0, 0)". Maybe it's with javascript or jquery.

<div class="owl-stage" style="transform: translate3d(0px, 0px, 0px); transition: 0.25s; width: 1055px; padding-left: 40px; padding-right: 40px;"></div>
    
asked by Daijard 21.11.2017 в 14:19
source

1 answer

2

With jquery you can validate the value of the property but I have not tried it if you can validate the value with the exact pixels, if you put your code with which you need to perform the action maybe you can try but you can try your, the way to validate is with the .css () method, the structure would be like this:

if ($("#id_div").css("propiedad") == "valor_propiedad"){

/* ejecutar si */

}else{

/* ejecutar si no */
}
    
answered by 21.11.2017 в 15:04