Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork45
🔍 Zoom responsively, images & more, w/ jQuery.
License
AndersDJohnson/magnificent.js
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Zoom responsively. A jQuery plugin for responsive zoom of images & more!
(Table of contents generated byverb)
Check out thedemo! Or thedata-* attributesdemo.
- Scroll-to-zoom
- Drag interaction
- Inline option
- Control buttons
- Different proportions for thumb vs. zoom
- CSS 3D transforms
- Full screen (coming soon)
- Event support, e.g. for stats/HUDs
- Touch interaction (pan, pinch)
- Analytics
- Stabilized scroll-to-zoom, better for touchpads
- Support
data-*attributes for#37.
Install withbower
$ bower install magnificent --save
Install withnpm
$ npm i magnificent --save
If you're using AMD or Browersify, you'll probably just want to specify any main files you need, e.g.src/js/mag-jquery.js, as dependencies in your script(s).
You'll also want to include the CSS files below in your page.
Otherwise, you'll have to include individually in your page any main files you need, preceded by their dependencies.
First, any dependencies of any main files you need:
- jquery@~2.1.3
- jquery-bridget@~1.1.0
- jquery-mousewheel@~3.1.12
- bower_components/jquery-mousewheel/jquery.mousewheel.js
- Optional: For scroll/touchpad-pinch zoom.
- bower_components/jquery-mousewheel/jquery.mousewheel.js
- jquery.threedubmedia@*
- bower_components/jquery.threedubmedia/event.drag/jquery.event.drag.js
- Optional: For drag interaction.
- bower_components/jquery.threedubmedia/event.drag/jquery.event.drag.js
- screenfull@~2.0.0
- bower_components/screenfull/dist/screenfull.js
- Optional: For fullscreen.
- bower_components/screenfull/dist/screenfull.js
- google-analytics-js@^0.1.0
- bower_components/google-analytics-js/gajs.js
- Optional: For analytics. Please :).
- bower_components/google-analytics-js/gajs.js
- hammerjs@~2.0.4
- bower_components/hammerjs/hammer.js
- Optional: For touch interaction (pan, pinch).
- bower_components/hammerjs/hammer.js
- prevent-ghost-click@~0.0.0
- bower_components/prevent-ghost-click/PreventGhostClick.js
- Optional: For touch interaction (pan, pinch).
- bower_components/prevent-ghost-click/PreventGhostClick.js
<scriptsrc="bower_components/jquery/dist/jquery.js"></script><scriptsrc="bower_components/jquery-bridget/jquery.bridget.js"></script><scriptsrc="bower_components/jquery-mousewheel/jquery.mousewheel.js"></script><scriptsrc="bower_components/jquery.threedubmedia/event.drag/jquery.event.drag.js"></script><scriptsrc="bower_components/screenfull/dist/screenfull.js"></script><scriptsrc="bower_components/google-analytics-js/gajs.js"></script><scriptsrc="bower_components/hammerjs/hammer.js"></script><scriptsrc="bower_components/prevent-ghost-click/PreventGhostClick.js"></script>
Then, any main files you need:
- src/js/mag-analytics.js
- Optional: For analytics. Please :).
- src/js/mag.js
- src/js/mag-jquery.js
- src/js/mag-control.js
- Optional: For controls.
- src/css/mag.css
- src/theme/default.css
- Optional: Or another theme.
- src/js/mag-analytics.js
<scriptsrc="bower_components/magnificent/src/js/mag-analytics.js"></script><scriptsrc="bower_components/magnificent/src/js/mag.js"></script><scriptsrc="bower_components/magnificent/src/js/mag-jquery.js"></script><scriptsrc="bower_components/magnificent/src/js/mag-control.js"></script><linkrel="stylesheet"href="bower_components/magnificent/src/css/mag.css"/><linkrel="stylesheet"href="bower_components/magnificent/src/theme/default.css"/>
See usage examples indemo.Also theJSDoc, especiallyoptions.
This component includes tracking via Google Analytics.The purpose is to better understand how and where it's used, as a guide for development.
To opt-out of this tracking, before loading the script on your page,use the global options in JavaScript, withnoTrack set totrue, as follows:
window.MAGNIFICENT_OPTIONS={noTrack:true};
Pull requests and stars are always welcome. For bugs and feature requests,please create an issue.
In lieu of a formal styleguide, please:
- Take care to maintain the existing coding style
- Add unit tests for any new or changed functionality
- Re-build documentation withverb-cli before submitting a pull request.
Install dev dependencies, then runverb:
$npminstall-d&&verb
Install dev dependencies:
$ npm i -d&& npmtest
Seehttps://github.com/AndersDJohnson/magnificent.js/tree/v1.x.
Copyright © 2013-2017Anders D. Johnson.Released under the MIT license.
This file was generated byverb-cli on September 02, 2017.
About
🔍 Zoom responsively, images & more, w/ jQuery.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.
