Appcan Introductory Learning Picture Carousel and its event handling

Source: Internet
Author: User

Slider Slider Use

One, add the slider

Second, complete the event processing in JS

Function

Appcan.slider ({ parameter})

selector:/* Selector */,

Hasindicator:true or False/* is there a position cue bar */,

Haslabel : TRUE or false/* is there a label text field */,

aspectratio:0 or!=0/* whether to control the aspect ratio, 0 is to use the control height, >0 uses the aspect ratio */,

index:0 or >0/* Default selection * /

Auto : +/* carousel time, in milliseconds per millisecond * /

Method:

Set (data)

Clickitem Events

Example 1:

1. Add a slider

<!-- Add a slider -

<div id= "Slider" class= "Slider" ></div>

2.js Code:

Var slider = appcan.slider ({        selector :   ' #slider ',        aspectratio:6/16,         hasLabel:true,        index:0,         auto:2000        });         slider.set ([{        img :   "Images/slider1.jpg",         label: ""          }, {        img :  "images/ Slider2.jpg ",         label:" "         }, {        img :  "Images/slider3.jpg",        &nbSp;label: "&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;}])         Slider.on ("Clickitem", function (Index,data) {})


Clickitem Events triggering

in the Slider.on ("Clickitem", function (Index,data) {}) You can add event processing in the

Such as:

Slider.on ("Clickitem", Function (Index,data) {             if (0 == index) {                 appcan.window.open (' page ',  ' page.html ',  10);             }else if (1 == index) {                 appcan.window.open (' Page2 ',  ' page2.html ', &NBSP;10);             }else if (2 ==  index) {                 Appcan.window.open (' page3 ',  ' page3.html ',  10);             }else{                 alter ("error");nbsp;           }}) 


This article is from the "Beyond the Horizon" blog, be sure to keep this source http://udbful.blog.51cto.com/10601869/1684946

Appcan Introductory Learning Picture Carousel and its event handling

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.