(function ($) {
    var itemTemplate = '<div class="parte-item" > </div>';
    var itemTemplateLabel = '<label class="lbl" for=""></label>';
    var itemTemplateCheckBox = '<input type="checkbox"  autocomplete="off" />';

    var box = '<div id="parte-container" class="parte-container">' +
                '<div class="btn btn-app btn-xs btn-warning parte-btn" id="parte-btn">' +
                    '<i class="fa fa-cog bigger-130"></i>' +
                 '</div>' +
                 '<div  id="parte-box" class="parte-box clearfix" >' +
                    '<div id="parte-items" class="pull-left width-50"></div>' +
                 '</div>' +
            '</div>';

    var index = 0;
    $.fn.parte = function (options) {
        debugger
        var settings = $.extend({
            // These are the defaults.
            saveOriginalData: true,
            backgroundColor: "white",
            top:'20px'
        }, options);

        if (this.length && !$('#parte-container').length) {
            $('body').append(box);
        }

        $('#parte-container').css('top', settings.top);

        $('#parte-btn').click(function () {
            if ($('#parte-box').length) {
                if ($('#parte-box').hasClass('open'))
                    $('#parte-box').removeClass('open');
                else
                    $('#parte-box').addClass('open');
            }

        });

        var elements = this.each(function (i, e) {
            var item = $(itemTemplate);
            var label = $(itemTemplateLabel);
            var checkbox = $(itemTemplateCheckBox);

            $(item).append(checkbox);
            $(item).append(label);


            $("#parte-container #parte-items").append(item);

            //set label name
            if (e.getAttribute('data-parte-name')) {
                label.html(e.getAttribute('data-parte-name'));
            } else {
                label.html('parte-label' + index);
            }

            //save data if saveOriginalData is true
            if (settings.saveOriginalData) {
                e.setAttribute("data-parte-value", e.value);
            }

            //set checkbox id, label for and related element id
            label.attr('for', 'parte-checkbox' + index);
            checkbox.attr('id', 'parte-checkbox' + index);
                       $(checkbox).change(function () {
                var cb = this;
                if (cb.checked) {
                    $(e).hide();
                } else {
                    $(e).show();
                }
            });

            index++;
        });

        return elements;
    };


    $.fn.parte.update = function (options) {
        var settings = $.extend({
            // These are the defaults.
            color: "#556b2f",
            backgroundColor: "white"
        }, options);

        return this.each(function () {
            // Do something to each element here.
        });

        return this;
    };

}(jQuery));

@@ -194,26 +194,8 @@
 x%22  
-autocomplete=%22off%22
  /%3E'
@@ -360,69 +360,8 @@
 ' +%0A
-                    '%3Ci class=%22fa fa-cog bigger-130%22%3E%3C/i%3E' +%0A
     
@@ -647,25 +647,8 @@
 ) %7B%0A
-        debugger%0A
     
@@ -693,130 +693,135 @@
     
-// These are the defaults.%0A            saveOriginalData: true,%0A            backgroundColor: %22white%22,%0A            top:'20px
+top: '20px',%0A            onChange: function (element, checked) %7B %7D,%0A            htmlicon: '%3Ci class=%22fa fa-cog bigger-130%22%3E%3C/i%3E
 '%0A  
@@ -999,24 +999,74 @@
 ings.top);%0A%0A
+        $('#parte-btn').html(settings.htmlicon);%0A%0A
         $('#
@@ -1400,16 +1400,22 @@
 on (i, e
+lement
 ) %7B%0A    
@@ -1623,17 +1623,16 @@
 abel);%0A%0A
-%0A
         
@@ -1731,16 +1731,22 @@
    if (e
+lement
 .getAttr
@@ -1758,25 +1758,24 @@
 ('data-parte
--
 name')) %7B%0A  
@@ -1799,17 +1799,27 @@
 el.html(
-e
+%22 %22+element
 .getAttr
@@ -1835,17 +1835,16 @@
 ta-parte
--
 name'));
@@ -1892,16 +1892,22 @@
 el.html(
+%22 %22 + 
 'parte-l
@@ -1941,181 +1941,8 @@
  %7D%0A%0A
-            //save data if saveOriginalData is true%0A            if (settings.saveOriginalData) %7B%0A                e.setAttribute(%22data-parte-value%22, e.value);%0A            %7D%0A%0A
     
@@ -2129,27 +2129,16 @@
         
-           
 $(checkb
@@ -2250,16 +2250,22 @@
      $(e
+lement
 ).hide()
@@ -2314,16 +2314,22 @@
      $(e
+lement
 ).show()
@@ -2348,16 +2348,72 @@
       %7D%0A
+                settings.onChange(element, cb.checked);%0A
         
@@ -2488,24 +2488,26 @@
     %7D;%0A%0A%0A   
+/*
  $.fn.parte.
@@ -2675,16 +2675,71 @@
  %22white%22
+,%0A            onChange: function (element, checked) %7B %7D
 %0A       
@@ -2882,16 +2882,18 @@
 ;%0A    %7D;
+*/
 %0A%0A%7D(jQue

Update parte.js