/SmartClick

Simulate native app list click in mobile device

Primary LanguageJavaScript

SmartClick

SmartClick simulate native app click in mobile device.

##How to Use? var sc = new SmartClick(el, options);

##Example

var sc = new SmartClick('wrapper');

##el el list wrapper id or wrapper Element Object

##OPTIONS

###Configuration

className default is 'ui-selected', list item selected className

layoutDir default is 'vertical', list view layout mode : 'horizontal', 'vertical', 'both'

modeType default is 'single', list or button mode type : 'single', 'mutil', 'tap', 'single' is Single-selection list, 'mutil' is Multiple-selection list, 'tap' is click.

sensTime default is 80, time of sensitivity in ms

sensDist default is 0.4, distance of sensitivity, if value less than 1 for wrapper size percentage, more then 1 is the absolute pixel

###Events

onSel when user select item, will be exec in selected item context

onUnSel when user unselect item and list can be multiple choice, will be exec in unselect item context

##Method

destory you can call destory function to destory Instance