Last active
June 14, 2016 16:07
-
-
Save boarnoah/720e50573fcd0e18f61d172ce65e0143 to your computer and use it in GitHub Desktop.
angular-elevatezoom-plus useage testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Add ezp in index.html: | |
- For whatever reason, not including both copies of jquery causes a moduleerr(?) | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.js"></script> | |
<script src='https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.18/src/jquery.ez-plus.js'></script> | |
<script src='https://cdn.rawgit.com/igorlino/angular-elevatezoom-plus/1.1.18b/js/angular-ezplus.js'></script> | |
1b) Add in ezplus to angular dependecies in app.js: | |
angular.module('custom', [..., 'ezplus'])... | |
2) Add in an img with the ezp directives in index.html: | |
<img id="img_01" | |
ez-plus | |
ezp-model="{ | |
thumb: 'http://res.cloudinary.com/boarnoah/image/upload/v1460593768/logoBoarnoah_j2s0k8.png', | |
small: 'http://res.cloudinary.com/boarnoah/image/upload/v1460593768/logoBoarnoah_j2s0k8.png', | |
large: 'http://res.cloudinary.com/boarnoah/image/upload/v1460593768/logoBoarnoah_j2s0k8.png' | |
}" | |
ezp-options="{scrollZoom: true, initial: 'small'}" | |
src='http://res.cloudinary.com/boarnoah/image/upload/v1460593768/logoBoarnoah_j2s0k8.png' | |
/> | |
Additional steps: | |
3) Add in a .ezPlus function to the img tag in app.js | |
$('#img_01').ezPlus({ | |
zoomWindowFadeIn: 500, | |
zoomLensFadeIn: 500, | |
gallery: '', | |
imageCrossfade: true, | |
zoomWindowWidth: 411, | |
zoomWindowHeight: 274, | |
zoomWindowOffetx: 10, | |
scrollZoom: true, | |
cursor: 'default' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment