Browse Source

Adds beforechange callback to shape

pull/2229/head
jlukic 11 years ago
parent
commit
15408ec3ed
1 changed files with 3 additions and 1 deletions
  1. 4
      src/modules/shape.js

4
src/modules/shape.js

@ -106,6 +106,7 @@ $.fn.shape = function(parameters) {
module.reset();
module.set.active();
};
$.proxy(settings.beforeChange, $nextSide[0])();
if(module.get.transitionEvent()) {
module.verbose('Starting CSS animation');
$module
@ -244,7 +245,7 @@ $.fn.shape = function(parameters) {
$nextSide
.addClass(className.active)
;
$.proxy(settings.onChange, $nextSide)();
$.proxy(settings.onChange, $nextSide[0])();
module.set.defaultSide();
}
},
@ -754,6 +755,7 @@ $.fn.shape.settings = {
namespace : 'shape',
// callback occurs on side change
beforeChange : function() {},
onChange : function() {},
// animation duration

Loading…
Cancel
Save