A mobile phone-side jquery image Slider Plugin

Source: Internet
Author: User

Today we are going to introduce a special jquery image slider plug-in, which is not only available on PC browsers, but also more suitable for use on mobile Web pages. This jquery plugin not only can define the direction of the picture switch, but also can instantly toggle the animation mode of the picture switch, can have panning, flipping, rotating and slide mode, the animation effect is very good.

Online preview Source Download

Code to implement:

    <h4style= "Text-align:center">animatetype parameter settings, currently support default, rotate, flip and depth, click the button to see the effect</h4>    <Divstyle= "text-align:center; clear:both;">    </Div>    <DivID= "Islider-effect-wrapper">        <DivID= "Animation-effect"class= "Islider-effect">        </Div>    </Div>    <DivID= "Menu-select">        <spanclass= "On">Default</span> <span>Rotate</span> <span>Flip</span> <span>Depth</span>    </Div>    <h4style= "Text-align:center">Vertical Carousel</h4>    <DivID= "Vertical-slide"class= "Islider-effect">    </Div>    <h4style= "Text-align:center">Non-cyclic mode (the initial and last picture slide will have attenuation effect)</h4>    <DivID= "Non-looping"class= "Islider-effect">    </Div>    <h4style= "Text-align:center">DOM</h4>    <DivID= "Dom-effect"class= "Islider-effect">    </Div>

JS Code:

varPiclist =[{width:150, Height:207, Content:"Images/1.jpg",}, {width:150, Height:207, Content:"Images/2.jpg",}, {width:150, Height:207, Content:"Images/3.jpg",}, {width:150, Height:207, Content:"Images/5.jpg"}, {width:150, Height:207, Content:"Images/6.jpg"}, {width:300, Height:414, Content:"Images/7.jpg"}, {width:150, Height:207, Content:"Images/8.jpg"}, {width:150, Height:207, Content:"Images/9.jpg"        }        ]; varDomlist = [        {            ' Height ': ' 100% ',            ' Width ': ' 100% ',            ' Content ': ' <div>        },{            ' Height ': ' 100% ',            ' Width ': ' 100% ',            ' Content ': ' <div>        },{            ' Height ': ' 100% ',            ' Width ': ' 100% ',            ' Content ': ' <div>        },{            ' Height ': ' 100% ',            ' Width ': ' 100% ',            ' Content ': ' <div>        }        ]; //All animation effect        varIslider1 =NewIslider ({data:piclist, dom:document.getElementById ("Animation-effect"), Duration:2000, Animatetype:' Default ', Isautoplay:true, islooping:true,            //Isvertical:true, whether to scroll vertically        });        Islider1.bindmouse (); //Vertical Slide        varIslider2 =NewIslider ({data:piclist, dom:document.getElementById ("Vertical-slide"), Duration:2000, Animatetype:' Default ', isvertical:true, Isautoplay:true, islooping:true,        });        Islider2.bindmouse (); //do not loop without auto play        varIslider3 =NewIslider ({data:piclist, dom:document.getElementById ("Non-looping"), Animatetype:' Default ',        });        Islider3.bindmouse (); //scrolling Dom        varIslider4 =NewIslider ({data:domlist, dom:document.getElementById ("Dom-effect"), type:' Dom ', Animatetype:' Default ', Isautoplay:true, islooping:true,        });                Islider4.bindmouse (); varmenu = document.getElementById (' Menu-select '). Children; functionclickmenuactive (target) { for(vari = 0; i < menu.length; i++) {Menu[i].classname= ' '; } target.classname= ' on '; } menu[0].onclick =function() {clickmenuactive ( This); Islider1._opts.animatetype= This. InnerHTML;        Islider1.reset ();        }; menu[1].onclick =function() {clickmenuactive ( This); Islider1._opts.animatetype= This. InnerHTML;        Islider1.reset ();        }; menu[2].onclick =function() {clickmenuactive ( This); Islider1._opts.animatetype= This. InnerHTML;        Islider1.reset ();        }; menu[3].onclick =function() {clickmenuactive ( This); Islider1._opts.animatetype= This. InnerHTML;        Islider1.reset (); };

Code:

jquery picture Slider plug-in for a mobile phone

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.