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

Loading…
Cancel
Save