javascript - Change the transformz property -
i need change transformz of element using jquery. have div css:
.bottom_face { -webkit-transform: rotatex(-90deg) rotate(180deg) translatez(487px); -moz-transform: rotatex(-90deg) rotate(180deg) translatez(347px); } when user changes property on form change translatez value add amount enter:
$('.bottom_face ').css('-webkit-transform') ?? how access translatez property of above without overwriting rotatex , rotate properties?
thanks
here code tried strip down bare minimum:
$("#add").click(function() { var z = $("#z").val(); $(".bottom-face").each(function() { var $c = $(this); var css; if (css = $c.css("-webkit-transform")) { // assignment $c.css("-webkit-transform", $c.css("-webkit-transform") + " translatez(" + z + "px)" ); //console.log( $c.css("-webkit-transform") ); } }); }); and link jsfiddle
Comments
Post a Comment