PDA

View Full Version : Reset Button on Div element



CGordon
10-14-2014, 01:43 PM
1) Script Title: Imagepanner.js

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...magepanner.htm

3) Describe problem: I'd like to add a reset button/div. Clicking the reset button would reset the image to it's original zoom level and alignment. Please let me know how this can be accomplished/if it's possible? Thank you very much!

Here's the markup I'd like to use:


<div id="productdetails_reset">
<div class="svg-container reset">
<svg viewbox="0 0 100 112.6" preserveaspectratio="xMinYMin meet">
<use xlink:href="#icon-reset">
</use>
</svg>
</div>
<div class="scene-view__control-label">Reset</div>
</div>

CGordon
10-16-2014, 03:06 PM
Hmm... Maybe this is easier then I thought? And that's why there are 110 views but no response?

Would it be possible to just get pointed in the right direction on this? Please and thanks!

I found this thread which seems to be similar to what I'm trying to accomplish here, but the attachment no longer works.
http://www.dynamicdrive.com/forums/showthread.php?67094-Simple-Image-Panner-and-Zoomer-v1-1-want-zoom-level-to-default-back-to-1-on-change

jscheuer1
10-17-2014, 03:54 AM
This is the attachment from then. Hope it helps:

5543