mirror of
https://github.com/ExactTarget/fuelux.git
synced 2026-01-14 17:07:55 -05:00
45 lines
1.4 KiB
JavaScript
45 lines
1.4 KiB
JavaScript
/*!
|
|
* JavaScript for Fuel UX's docs - Examples
|
|
* Copyright 2011-2014 ExactTarget, Inc.
|
|
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
|
|
* details, see https://creativecommons.org/licenses/by/3.0/.
|
|
*/
|
|
|
|
define(function (require) {
|
|
var jquery = require('jquery');
|
|
|
|
require('bootstrap');
|
|
require('fuelux');
|
|
|
|
// COMBOBOX
|
|
$('#btnComboboxGetSelectedItem').on('click', function () {
|
|
console.log($('#myCombobox').combobox('selectedItem'));
|
|
});
|
|
$('#btnComboboxSelectByValue').on('click', function () {
|
|
$('#myCombobox').combobox('selectByValue', '1');
|
|
});
|
|
$('#btnComboboxSelectByIndex').on('click', function () {
|
|
$('#myCombobox').combobox('selectByIndex', '1');
|
|
});
|
|
$('#btnComboboxSelectByText').on('click', function () {
|
|
$('#myCombobox').combobox('selectByText', 'Four');
|
|
});
|
|
$('#btnComboboxSelectBySelector').on('click', function () {
|
|
$('#myCombobox').combobox('selectBySelector', 'li[data-fizz=buzz]');
|
|
});
|
|
$('#myComboBoxWithSelectedInput').on('changed.fu.combobox', function (evt, data) {
|
|
console.log(data);
|
|
});
|
|
$('#btnComboboxDisable').on('click', function () {
|
|
$('#myCombobox').combobox('disable');
|
|
});
|
|
$('#btnComboboxEnable').on('click', function () {
|
|
$('#myCombobox').combobox('enable');
|
|
});
|
|
$('#btnComboboxDestroy').on('click', function () {
|
|
var markup = $('#myCombobox').combobox('destroy');
|
|
console.log(markup);
|
|
$(this).closest('.section').append(markup);
|
|
});
|
|
});
|