Monday, November 25, 2013

How to disable jQuery UI tab(s)

Single tab

$( "#tabs" ).tabs( "option", "disabled", 1);

Multiple tabs

$( "#tabs" ).tabs('option','disabled', [1, 2, 3, 4]);

Saturday, November 9, 2013

An entry with the same key already exists.

Causes:
  • Multiple asp net controls with same ID
  • Mostly occurs inside ListView control 
  • Keep an eye on validator controls. Try to have different id on master and child pages.

Sunday, November 3, 2013

Change an Image while using JCrop

Initialize jCrop
var jcrop_api;
        function InitjCrop() {
            $('#id').Jcrop({  }, function () {
                jcrop_api = this;
            });
        }
To unhook jCrop
jcrop_api.destroy();
To Hook jCrop again
InitjCrop();