For picture light box plug-in unit I had no feeling until more and more people contacted me to say its importance, so the theme slowly opened Fancybox image light box plug-in, which has powerful effects and functions, but recently found“ ViewImage.js ”This is a plug-in developed based on jQuery. After Gzip compression, it is less than 1kb. It also supports a responsive minimalist lightbox plug-in. It is intended to integrate all themes into this plug-in. It is really super compact, and has been used several times with good results. On this basis, it has simply optimized several css, and it is easy to do this minimalist plug-in considering everyone's different requirements (at the bottom of the article under the plug-in address) 。
If you do not need to use plug-ins, it is easy to integrate them into the theme, course As follows:
obtain
You can directly access the GitHub of ViewImage to get the latest plug-in, of course, you can also download ViewImage through the following link: view-image.js or view-image.min.js
quote
First make sure that your page has correctly referenced jQuery (2.0+is recommended), and then reference ViewImage.js (I don't like to use this CDN to accelerate js locally).
<script src="//tokinx.github.io/ViewImage/view-image.min.js"></script>
Enable
We provide you with a very simple initialization method, so that you can personalize the program and enable it correctly
<script> jQuery(document).ready(function () { jQuery.viewImage({ 'target ':'. view image img ',//The image that needs to use ViewImage 'exclude': '. exclude img',//Pictures to exclude 'delay ': 300//Delay time }); }); </script>
The manual operation is completed, and the“ .view-image img ”Change to your own image class. Of course, if you don't want to modify it manually, download the plug-in. It's free. Search in the application center“ Picture light box ”Then get the plug-in and enable it. Nothing needs to be modified. Just install and enable the plug-in. Is there no more lazy person to operate than this? Finally, check the compatibility of the plug-in,
About plug-in compatibility
D\T | Firefox | Chrome | MSIE | Safari |
---|
PC | >=3.5 | Yes | >=9 | >=3.1 |
Mobile | Null | Null | Null | Null |
At present, everything is normal in the test. If you have any questions in the use process, please leave a message. Our purpose is to make things simple. It should be no better than“ ViewImage.js ”More concise, if there are some,,,, just think I didn't say!!!
Plug in address:
Image light box (minimalist plug-in) application center download