New Post has been published on Html Use
New Post has been published on http://www.htmluse.com/pickli-carousel-list-picker/
Pickli - Carousel List Picker
Download Demo
Pickli â Carousel Picker for li tags Features Carousel Picker for list. Horizontal or vertical orientation. Align on left / center / right or top / medium / bottom. Custom class for selected and unselected items. Responsive with onResize event. Custom data key. Call data with ajax. Interactivity with custom events and cursor. Animated change with custom transitions.
1. INCLUDE JS FILES 2. HTML Create a
element, with a
for each item. An item can contain any HTML content and need a value attribute.
Item 1
Item 2
Item 3
Item 4
3. JAVASCRIPT Call .pickli() on target
. Note that the call must be made inside of a $(document).ready() call, or the plugin will not work! $(document).ready(function() $(âulâ).pickli(); ); 4. OPTIONS Data default The default selected value. default: null options: string index The selected index. default: -1 options: integer value The selected value. default: null options: string labelKey The key used for the label in data collection. default: âlabelâ options: string valueKey The key used for the value in data collection. default: âvalueâ options: string autoErase If true, empty the slider when data is updated. If false, merge data with current collection. default: false options: boolean (true / false) data A collection of data (label / value) to fill the slider. default: [] options: array ([label:âItem 1âł,value:1, label:âItem 2âł,value:2, âŠ]) remote Options for ajax data load. (See the Remote configuration options) default: Remote options options: object (Remote options) Aspect orientation Display the slider horizontaly or verticaly. default: âhorizontalâ options: string (âhorizontalâ / âverticalâ) size If orientation == âhorizontalâ, size will affect width wrapper property. If orientation == âverticalâ, size will affect height wrapper property. default: â100%â options: string (width or height css value) selectAlign Alignment of selected item. If orientation == âverticalâ, use âleftâ for top, âcenterâfor middle and ârightâ for bottom. default: âcenterâ options: string (âleftâ / âcenterâ / ârightâ) unselectAlign Alignment when no item is selected. If orientation == âverticalâ, use âleftâ for top,âcenterâ for middle and ârightâ for bottom. default: âcenterâ options: string (âleftâ / âcenterâ / ârightâ) wrapperClass A class name used for the
wrapper. default: âpickliâ options: string selectClass Class name of the selected item. default: âactiveâ options: string unselectClass Class name of the unselected items. default: â options: string autoResize Refresh the position slider on window resize. default: false options: boolean (true / false) Interactivity interaction Mouse or Touch Events for select an item. default: âclickâ options: string transition How animate the slider when the selection change. If false, desactive animations. (See the Transition configuration options) default: Transition options options: object (Transition options) cursor The cursor used on the slider. default: âpointerâ options: string (A CSS cursor value) loop If true, clicking âNextâ while on the last item will transition to the first item and vice-versa. default: false options: boolean (true / false) 5. CALLBACKS onChange Executes immediately after a item is selected (or unselected) default: null options: function(value) // your code here arguments: value: value of the selected item (string) onFill Executes immediately after the data collection change. default: null options: function(data) // your code here arguments: data: current data collection (array) 6. REMOTE OPTIONS Used for call a json data file or service with ajax. How use it ? You can load data when you initialize the slider: slider = $(â#targetâ).pickli( remote: url:âhttp://âŠâ, ⊠); Or latter with the public method: slider.remote(âhttp://âŠâ); // or slider.remote( url: âhttp://âŠâ, type: âGETâ, ⊠); Options url The url used for load JSON data. default: â options: string type The type of request to make default: âGETâ options: string (âPOSTâ / âGETâ) data Data to be sent to the server. (see the jQuery.ajax() documentation) default: null options: string or object or array crossDomain If you wish to force a crossDomain request on the same domain. default: false options: boolean loader A jQuery object witch will be occulted or visible when data are loaded. loader.show() when dispatch onRemoteStart, loader.hide() when dispatch onRemoteSuccess or onRemoteError. default: null options: jQuery object Callbacks onRemoteStart Executes immediately before the data ajax call. default: null options: function() // your code here onRemoteSuccess Executes on jQuery ajax success event. default: null options: function(data) // your code here arguments: data: loaded data collection (array) onRemoteError Executes on jQuery ajax error event. default: null options: function(data) // your code here arguments: e: error (object) 7. TRANSITION OPTIONS If you set the transition to false, it will desactivate the animation. Options: duration A string or number determining how long the animation will run. (see jQuery.animate documentation) default: ânormalâ options: integer or string (âslowâ / ânormalâ / âfastâ) easing A string indicating which easing function to use for the transition. (see jQuery.animate documentation or http://api.jqueryui.com/easings/ for the list of easing) default: âswingâ options: string (âlinearâ / âswingâ / âeaseInQuadâ / âeaseOutCubicâ / âeaseInOutQuartâ / âŠ) Callbacks onTransitionStart Executes on jQuery animate start event. default: null options: function() // your code here onTransitionComplete Executes on jQuery animate complete event. default: null options: function(data) // your code here 8. METHODS next Select next item. Do nothing if there is not item selected. example: slider = $(â#targetâ).pickli(); slider.next(); prev Select previous item. Do nothing if there is not item selected. example: slider = $(â#targetâ).pickli(); slider.prev(); first Select first item. example: slider = $(â#targetâ).pickli(); slider.first(); last Select last item. example: slider = $(â#targetâ).pickli(); slider.last(); jump Jump to an item adding o substracting a value to the current index. Do nothing if there is not item selected. example: slider = $(â#targetâ).pickli(); slider.jump(-3); refresh Refresh the slider with the current selection. example: slider = $(â#targetâ).pickli(); slider.refresh();









