zoom.js

Medium's Image Zoom for jQuery

  • 所有者: fat/zoom.js
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

ZOOM.JS

A simple jQuery plugin for image zooming; as seen on Medium.

Demo

https://fat.github.io/zoom.js

How

  1. Link the zoom.js and zoom.css files to your site or application.
<link href="css/zoom.css" rel="stylesheet">
<script src="js/zoom.js"></script>
  1. zoom.js is dependent on transition.js file from Bootstrap, so make sure to include that as well.
<script src="js/transition.js"></script>
  1. Add a data-action="zoom" attribute to the images you want to make zoomable. For example:
<img src="img/blog_post_featured.png" data-action="zoom">

Why

It's the best way to zoom an image. It transitions/zooms in really smoothly, and then when you're done, scrolls away, [esc] keys away, clicks away… clean af.

If you hold your meta key ( on mac) or (ctrl on windows), it will open in a new tab. wow.

ps. use a data-original attr to link to a separate image. Just for meta-clicking tho.

Where

zoom.js should (in theory) work in all relevant browsers (ie9+). If not, create an issue! Thanks!

Who

Written by @fat, made better by you.

概覽

名稱與所有者fat/zoom.js
主編程語言JavaScript
編程語言CSS (語言數: 3)
平台
許可證MIT License
發布數1
最新版本名稱v0.0.1 (發布於 )
第一版名稱v0.0.1 (發布於 )
創建於2013-10-24 05:45:32
推送於2023-02-17 23:27:23
最后一次提交2015-08-07 16:15:11
星數4k
關注者數83
派生數332
提交數45
已啟用問題?
問題數68
打開的問題數30
拉請求數8
打開的拉請求數9
關閉的拉請求數17
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?
去到頂部