Jquery provides an example of full-screen image gallery effects with thumbnails.
This example describes how jquery achieves full-screen image galleries with thumbnails. Share it with you for your reference. The details are as follows:
Shows the running effect:
The main code is as follows:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
(Function ($ ){ $. Fn. preload = function (options ){ Var opts = $. extend ({}, $. fn. preload. defaults, options ); O = $. meta? $. Extend ({}, opts, this. data (): opts; Var c = this. length, L = 0; Return this. each (function (){ Var $ I = $ (this ); $ (''). load (function (I ){ + + L; If (l = c) o. onComplete (); }). Attr ('src', $ I. attr ('src ')); }); }; $. Fn. preload. defaults = { OnComplete: function () {return false ;} }; }) (JQuery ); |
Click here to download the complete instance code.
I hope this article will help you with jquery programming.