Jcrop Image

Animation/Transitions. Demonstration of animateTo API method and transitions for bgColor and bgOpacity options. Color fading requires inclusion of John Resig's jQuery Color Animations plugin. If it is not included, colors will not fade.

' ) ); }; // Handler for option-setting buttons function setoptHandler(k,v) { return function(e) { $(e.target).closest('.btn-group').find('.active').removeClass('active'); $(e.target).addClass('active'); var opt = { }; opt[k] = v; jcrop_api.setOptions(opt); return false; }; }; // Handler for animation buttons function animHandler(v) { return function(e) { $(e.target).addClass('active'); jcrop_api.animateTo(v,function(){ $(e.target).closest('.btn-group').find('.active').removeClass('active'); }); return false; }; }; $('#bgo_buttons .btn:first,#bgc_buttons .btn:last').addClass('active'); $('#interface').show(); });