I have an unusual situation where I would like to enable dragging and re-sizing to an image that sits behind another image overlay in html. It looks like this.
The image in the background (ie: the coke bottle) is made resizable and draggable using jQuery UI. However the problem lies in trying to drag the image when clicking within the bounds of the overlaid image. This obviously fails because the overlaid image sits ontop of the draggable element and is just a transparency.
This is the html and javascript being used.
$(".Overlay").draggable({ containment: "#divPhone", scroll: false }).resizable();
<div id="divPhone" style="position: relative;">
<div style="display: inline-block;" class="Overlay"><img src="ImageSource.png" style="width: 100%;height: 100%;" /></div>
<div style="position: absolute; left: 85px; top: 0px;"><img src="ImageSource.png" style="width: 240px;" /></div>
</div>
Could anyone suggest any workarounds for this problem? The only solution I can think of is switching the indexes of the images when a click event occurs but assume there must be a better solution.