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) {
13 var ChRadioInput = function(element, options) {
14 $.fn.ch_widget.Constructor(element, options);
15 this.$element = $(element);
16 this.options = $.extend(
18 $.fn.ch_widget.defaults,
20 disableWhenDriving: true
24 ChRadioInput.prototype = $.extend(
26 $.fn.ch_widget.Constructor.prototype,
28 constructor: ChRadioInput
32 $.fn.ch_radio_input = function(option) {
33 return this.each(function() {
35 data = $this.data('ch_radio_input'),
36 options = typeof option == 'object' && option;
39 $this.data('ch_radio_input', (data = new ChRadioInput(this, options)));
45 $.fn.ch_radio_input.Constructor = ChRadioInput;
47 /* CHRADIOINPUT DATA-API
48 * ================= */
50 $('input[type=radio]').ch_radio_input();