$(function() { var $wrapper = $('#wrapper'); // theme switcher var theme_match = String(window.location).match(/[?&]theme=([a-z0-9]+)/); var theme = (theme_match && theme_match[1]) || 'default'; var themes = ['default','legacy','bootstrap2','bootstrap3']; $('head').append(''); var $themes = $('
').addClass('js').text(code); $pre.insertAfter(this); } }); // show current input values $('select.selectized,input.selectized', $wrapper).each(function() { var $container = $('').addClass('value').html('Current Value: '); var $value = $('').appendTo($container); var $input = $(this); var update = function(e) { $value.text(JSON.stringify($input.val())); } $(this).on('change', update); update(); $container.insertAfter($input); }); });