javascript - Access property in div in jquery -
i want access transform in div <div id="slideshow3" class="slideshow" style="width: 490px; height: 490px; margin-top: 10px; margin-left: 10px; transform: rotate(-10.9956rad);">
, it's there instead of inside css because value edited template.
i have tried $('#slideshow3').attr('transform');
doesn't work.
same problem when try z-index
li <li style="z-index: 100;"> <img width="100%" alt="fish" src="/media/cache/95/2d/952d083ec4919a006ad6666680ea322c.jpg" style="transform: rotate(-32.9867rad);"> </li>
you can't use .attr
because it's not attribute.
style
attribute.
try accessing css method style want. this:
$('#slideshow3').css('transform'); $('#slideshow3').css('z-index');
and if need set css can add second parameter css function this
$('#slideshow3').css('z-index', 10);
Comments
Post a Comment