(function ($) {
"use strict";
$.fn.colorSwitcher = function (ops) {
var $el = this,
$head = $('head'),
$body = $('body'),
$colorSwitcher, $colorSwitcherChild;
$head.append('');
$colorSwitcher = $('
Try Different Color Scheme:
')
.appendTo( $body )
.on('click', 'button', function () {
$(this).parent().toggleClass('in');
})
.on('click', 'li', function () {
$el.attr('href', ops[ this.getAttribute('data-c') ]);
});
$colorSwitcherChild = $colorSwitcher.children('ul');
for ( var $color in ops ) {
$colorSwitcherChild.append('');
}
};
}(jQuery));