• Stars
    star
    267
  • Rank 153,621 (Top 4 %)
  • Language
    JavaScript
  • Created over 7 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

仿微信js-sdk wx.previewImage javascript实现,支持图片预览,滑动切换,双指缩放,图片缓存;Support for picture preview, slide switch, double finger zoom, picture caching

previewImage-mobile

仿微信js-sdk wx.previewImage javascript实现,支持图片预览,滑动切换,双指缩放,图片缓存;

it's a plugin previewImage for mobile html5 which support for picture preview, slide switch, double finger zoom, picture caching

Usage

Import dist/previewImage.min.js to your project:

    <script src="dist/previewImage.min.js"></script>
    <script>
        var obj = {
                urls : ['1.png','2.png','3.png'],
                current : '1.png'
            };
      previewImage.start(obj);
    </script>

And you can import dist/md5.js to your project,if imported it is uesd to get the hash for md5(image.src) else the hash is image.src;

    <script src="dist/md5.js"></script>
    <script src="dist/previewImage.min.js"></script>
    <script>
        var obj = {
                urls : ['1.png','2.png','3.png'],
                current : '1.png'
            };
      previewImage.start(obj);
    </script>

Demo

Demo