引用以下文件
1 2 3 | < link rel = "stylesheet" type = "text/css" href = "dist/swipeslider.css" > < script type = "text/javascript" src = "dist/swipeslider.min.js" ></ script > |
html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | < figure id = "full_feature" class = "swipslider" > < ul class = "sw-slides" > < li class = "sw-slide" > < img src = "img/summer_beach.jpg" alt = "Summer beach concept" > </ li > < li class = "sw-slide" > < img src = "img/lang_yie_ar_kung_fu.jpg" alt = "Lang from Yie Ar Kung Fu" > </ li > < li class = "sw-slide" > < img src = "img/tiny_vacation.jpg" alt = "Tiny Tina" > </ li > < li class = "sw-slide" > < img src = "img/borderlands_tiny_tina.jpg" alt = "Tiny Tina from Borderlands 2" > </ li > < li class = "sw-slide" > < img src = "img/redhead.jpg" alt = "Redhead girl" > </ li > </ ul > </ figure > |
js
1 2 3 4 5 | <script type= "text/javascript" > $(window).load( function () { $( '#full_feature' ).swipeslider(); } </script> |