npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

magnificent

v2.2.4

Published

Zoom responsively.

Downloads

31

Readme

Magnificent.js

Zoom responsively. A jQuery plugin for responsive zoom of images & more!

NPM version Bower Build Status

NPM

Join the chat at https://gitter.im/AndersDJohnson/magnificent.js

Table of Contents

(Table of contents generated by verb)

Demo

Check out the demo! Or the data-* attributes demo.

Features

2.0

  • 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

2.1

  • Touch interaction (pan, pinch)
  • Analytics
  • Stabilized scroll-to-zoom, better for touchpads

2.2

  • Support data-* attributes for #37.

Install

Bower

Install with bower

$ bower install magnificent --save

npm

Install with npm

$ npm i magnificent --save

Manual

Download manually.

Usage

  1. Load
  2. Integrate

Load

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.

<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="bower_components/jquery-mousewheel/jquery.mousewheel.js"></script>
<script src="bower_components/jquery.threedubmedia/event.drag/jquery.event.drag.js"></script>
<script src="bower_components/screenfull/dist/screenfull.js"></script>
<script src="bower_components/google-analytics-js/gajs.js"></script>
<script src="bower_components/hammerjs/hammer.js"></script>
<script src="bower_components/prevent-ghost-click/PreventGhostClick.js"></script>
<script src="bower_components/magnificent/src/js/mag-analytics.js"></script>
<script src="bower_components/magnificent/src/js/mag.js"></script>
<script src="bower_components/magnificent/src/js/mag-jquery.js"></script>
<script src="bower_components/magnificent/src/js/mag-control.js"></script>
<link rel="stylesheet" href="bower_components/magnificent/src/css/mag.css" />
<link rel="stylesheet" href="bower_components/magnificent/src/theme/default.css" />

Integrate

See usage examples in demo. Also the JSDoc, especially options.

Analytics

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, with noTrack set to true, as follows:

window.MAGNIFICENT_OPTIONS = {
  noTrack: true
};

Contributing

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 with verb-cli before submitting a pull request.

Build Docs

Install dev dependencies, then run verb:

$ npm install -d && verb

Tests

Install dev dependencies:

$ npm i -d && npm test

v1.x

See https://github.com/AndersDJohnson/magnificent.js/tree/v1.x.

Alternatives

License

Copyright © 2013-2017 Anders D. Johnson. Released under the MIT license.


This file was generated by verb-cli on September 02, 2017.