JSFiddle - React, Tailwind, and code Playground

by axtruo

HTML

<button id="b1">Scale</button>
<button id="b2">width and height</button>
<div id="currentimage">
    <img id="backgroundImg" src="http://s25.postimg.org/v554s2umn/man_looking_at_sunset.jpg" width="500px" style="height: auto; z-index: 0;" />
    <img id="dragable" src="http://s25.postimg.org/pi8ruls3z/image.jpg" width="200px" height="auto" />
</div>

CSS

#currentimage {
    position: relative;
}

 #currentimage img {
    position: absolute;
    top:0;
    left:0;
}

JavaScript

$(document).ready(function () {
    $("#dragable").draggable();
    
    $("#b1").click(function(){
          $('#dragable').css('transform','scale(2.12)');
    });
    
    $('#b2').click(function(){
        $obj = $('#dragable');
       alert($obj.width() + "  " + $obj.height());
    });
     
     
    
});