2 * Copyright (c) 2012, Intel Corporation.
4 * This program is licensed under the terms and conditions of the
5 * Apache License, version 2.0. The full text of the Apache License is at
6 * http://www.apache.org/licenses/LICENSE-2.0
10 (function($, undefined) {
11 var ChCheckboxInput = function(element, options) {
12 $.fn.ch_widget.Constructor(element, options);
13 this.$element = $(element);
14 this.options = $.extend(
16 $.fn.ch_widget.defaults,
18 disableWhenDriving: true
22 ChCheckboxInput.prototype = $.extend(
24 $.fn.ch_widget.Constructor.prototype,
26 constructor: ChCheckboxInput
31 /* CHCHECKBOXINPUT PLUGIN DEFINITION
32 * ================================= */
34 var old = $.fn.ch_checkbox_input;
36 $.fn.ch_checkbox_input = function(option) {
37 return this.each(function() {
39 data = $this.data('ch_checkbox_input'),
40 options = typeof option == 'object' && option;
43 $this.data('ch_checkbox_input', (data = new ChCheckboxInput(this, options)));
49 $.fn.ch_checkbox_input.Constructor = ChCheckboxInput;
52 /* CHCHECKBOXINPUT NO CONFLICT
53 * =========================== */
55 $.fn.ch_checkbox_input.noConflict = function() {
56 $.fn.ch_checkbox_input = old;
61 /* CHCHECKBOXINPUT DATA-API
62 * ================= */
65 $('input[type=checkbox]').ch_checkbox_input();