Crelly Slider - Version 0.6.8

Version Description

  • Added callback functions: beforeStart, beforeSetResponsive, afterSetResponsive, beforeSlideStart, afterSlideEnd, beforePause, afterPause, beforeResume
  • Fixed responsive methods that restarted the slide in particular moments uselessly
Download this release

Release Info

Developer fabiorino
Plugin Icon 128x128 Crelly Slider
Version 0.6.8
Comparing to
See all releases

Code changes from version 0.6.7 to 0.6.8

crellyslider.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Crelly Slider
5
  * Plugin URI: http://fabiorino1.altervista.org/projects/crellyslider
6
  * Description: The first free WordPress slider with elements animations.
7
- * Version: 0.6.7
8
  * Author: fabiorino
9
  * Author URI: http://fabiorino1.altervista.org
10
  * License: GPL2
@@ -14,7 +14,7 @@
14
  /** GLOBALS **/
15
  /*************/
16
 
17
- define('CS_VERSION', '0.6.7');
18
  define('CS_PATH', plugin_dir_path(__FILE__));
19
  define('CS_PLUGIN_URL', plugins_url() . '/crelly-slider');
20
 
4
  * Plugin Name: Crelly Slider
5
  * Plugin URI: http://fabiorino1.altervista.org/projects/crellyslider
6
  * Description: The first free WordPress slider with elements animations.
7
+ * Version: 0.6.8
8
  * Author: fabiorino
9
  * Author URI: http://fabiorino1.altervista.org
10
  * License: GPL2
14
  /** GLOBALS **/
15
  /*************/
16
 
17
+ define('CS_VERSION', '0.6.8');
18
  define('CS_PATH', plugin_dir_path(__FILE__));
19
  define('CS_PLUGIN_URL', plugins_url() . '/crelly-slider');
20
 
js/jquery.crellyslider.js CHANGED
@@ -2,7 +2,7 @@
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: http://fabiorino1.altervista.org/projects/crellyslider
4
  * Description: The first free WordPress slider with elements animations.
5
- * Version: 0.6.7
6
  * Author: fabiorino
7
  * Author URI: http://fabiorino1.altervista.org
8
  * License: GPL2
@@ -35,7 +35,8 @@
35
  var slide_progress = 0;
36
 
37
  var scale = 1;
38
-
 
39
  /********************/
40
  /** INITIALIZATION **/
41
  /********************/
@@ -119,10 +120,12 @@
119
  });
120
  }
121
 
122
- // Make responsive
123
- if(settings.responsive) {
124
  $(window).resize(function() {
 
125
  setResponsive();
 
126
  });
127
  }
128
 
@@ -147,6 +150,8 @@
147
  // Hide preloader
148
  unsetPreloader();
149
 
 
 
150
  // Store original elements values then hide all the slides and elements
151
  SLIDER.find(CRELLY).find(SLIDES).find(SLIDE).each(function(){
152
  $(this).find(ELEMENTS).each(function() {
@@ -167,6 +172,8 @@
167
  });
168
  });
169
 
 
 
170
  // Positions and responsive dimensions then run.
171
  if(settings.responsive) {
172
  setResponsive();
@@ -255,6 +262,8 @@
255
 
256
  // Scale every element to make it responsive. It automatically stops and plays the slider
257
  function setResponsive() {
 
 
258
  var slides = SLIDER.find(CRELLY).find(SLIDES).find(SLIDE);
259
 
260
  stop();
@@ -298,6 +307,10 @@
298
  });
299
  });
300
 
 
 
 
 
301
  play();
302
  }
303
 
@@ -360,12 +373,16 @@
360
 
361
  // If can be paused, pause
362
  if(! paused /*&& slide_ease_in_completed*/) {
 
 
363
  var slide = SLIDER.find(CRELLY).find(SLIDES).find(SLIDE + ':eq(' + current_slide + ')');
364
  var elements = slide.children();
365
 
366
  slide.finish();
367
 
368
  paused = true;
 
 
369
  }
370
  // Else try until you can pause
371
  else {
@@ -385,6 +402,8 @@
385
  }
386
 
387
  function resume() {
 
 
388
  wants_to_pause = false;
389
 
390
  var slide = SLIDER.find(CRELLY).find(SLIDES).find(SLIDE + ':eq(' + current_slide + ')');
@@ -602,6 +621,8 @@
602
 
603
  // Execute a slide
604
  function executeSlide(slide_index) {
 
 
605
  var slide = SLIDER.find(CRELLY).find(SLIDES).find(SLIDE + ':eq(' + slide_index +')');
606
 
607
  var def = new $.Deferred();
@@ -613,6 +634,7 @@
613
  slide_ease_in_completed = true;
614
  });
615
  finishSlide(slide_index, true).done(function() {
 
616
  def.resolve();
617
  });
618
 
@@ -1235,24 +1257,33 @@
1235
  // Plugin
1236
  $.fn.crellySlider = function(options) {
1237
  var settings = $.extend({
1238
- layout : 'fixed',
1239
- responsive : true,
1240
- startWidth : 1170,
1241
- startHeight : 500,
1242
- pauseOnHover : true,
1243
-
1244
- automaticSlide : true,
1245
- showControls : true,
1246
- showNavigation : true,
1247
- showProgressBar : true,
1248
-
1249
- slidesTime : 3000,
1250
- elementsDelay : 0,
1251
- elementsTime : 'all',
1252
- slidesEaseIn : 300,
1253
- elementsEaseIn : 300,
1254
- slidesEaseOut : 300,
1255
- elementsEaseOut : 300,
 
 
 
 
 
 
 
 
 
1256
  }, options);
1257
 
1258
  return this.each(function() {
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: http://fabiorino1.altervista.org/projects/crellyslider
4
  * Description: The first free WordPress slider with elements animations.
5
+ * Version: 0.6.8
6
  * Author: fabiorino
7
  * Author URI: http://fabiorino1.altervista.org
8
  * License: GPL2
35
  var slide_progress = 0;
36
 
37
  var scale = 1;
38
+ var window_width_before_setResponsive = 0; // This variable is useful ONLY to prevent that window.resize fires on vertical resizing
39
+
40
  /********************/
41
  /** INITIALIZATION **/
42
  /********************/
120
  });
121
  }
122
 
123
+ // Make responsive. Run if resizing horizontally and the slider is not at the right dimension
124
+ if(settings.responsive) {
125
  $(window).resize(function() {
126
+ if(window_width_before_setResponsive != $(window).width() && ((settings.layout == 'full-width' && getWidth() != $(SLIDER).width()) || ($(SLIDER).width() < getWidth() || (($(SLIDER).width() > getWidth()) && getWidth() < settings.startWidth)))) {
127
  setResponsive();
128
+ }
129
  });
130
  }
131
 
150
  // Hide preloader
151
  unsetPreloader();
152
 
153
+ window_width_before_setResponsive = $(window).width();
154
+
155
  // Store original elements values then hide all the slides and elements
156
  SLIDER.find(CRELLY).find(SLIDES).find(SLIDE).each(function(){
157
  $(this).find(ELEMENTS).each(function() {
172
  });
173
  });
174
 
175
+ settings.beforeStart();
176
+
177
  // Positions and responsive dimensions then run.
178
  if(settings.responsive) {
179
  setResponsive();
262
 
263
  // Scale every element to make it responsive. It automatically stops and plays the slider
264
  function setResponsive() {
265
+ settings.beforeSetResponsive();
266
+
267
  var slides = SLIDER.find(CRELLY).find(SLIDES).find(SLIDE);
268
 
269
  stop();
307
  });
308
  });
309
 
310
+ window_width_before_setResponsive = $(window).width();
311
+
312
+ settings.afterSetResponsive();
313
+
314
  play();
315
  }
316
 
373
 
374
  // If can be paused, pause
375
  if(! paused /*&& slide_ease_in_completed*/) {
376
+ settings.beforePause();
377
+
378
  var slide = SLIDER.find(CRELLY).find(SLIDES).find(SLIDE + ':eq(' + current_slide + ')');
379
  var elements = slide.children();
380
 
381
  slide.finish();
382
 
383
  paused = true;
384
+
385
+ settings.afterPause();
386
  }
387
  // Else try until you can pause
388
  else {
402
  }
403
 
404
  function resume() {
405
+ settings.beforeResume();
406
+
407
  wants_to_pause = false;
408
 
409
  var slide = SLIDER.find(CRELLY).find(SLIDES).find(SLIDE + ':eq(' + current_slide + ')');
621
 
622
  // Execute a slide
623
  function executeSlide(slide_index) {
624
+ settings.beforeSlideStart();
625
+
626
  var slide = SLIDER.find(CRELLY).find(SLIDES).find(SLIDE + ':eq(' + slide_index +')');
627
 
628
  var def = new $.Deferred();
634
  slide_ease_in_completed = true;
635
  });
636
  finishSlide(slide_index, true).done(function() {
637
+ settings.afterSlideEnd();
638
  def.resolve();
639
  });
640
 
1257
  // Plugin
1258
  $.fn.crellySlider = function(options) {
1259
  var settings = $.extend({
1260
+ layout : 'fixed',
1261
+ responsive : true,
1262
+ startWidth : 1170,
1263
+ startHeight : 500,
1264
+ pauseOnHover : true,
1265
+
1266
+ automaticSlide : true,
1267
+ showControls : true,
1268
+ showNavigation : true,
1269
+ showProgressBar : true,
1270
+
1271
+ slidesTime : 3000,
1272
+ elementsDelay : 0,
1273
+ elementsTime : 'all',
1274
+ slidesEaseIn : 300,
1275
+ elementsEaseIn : 300,
1276
+ slidesEaseOut : 300,
1277
+ elementsEaseOut : 300,
1278
+
1279
+ beforeStart : function() {},
1280
+ beforeSetResponsive : function() {},
1281
+ afterSetResponsive : function() {},
1282
+ beforeSlideStart : function() {},
1283
+ afterSlideEnd : function() {},
1284
+ beforePause : function() {},
1285
+ afterPause : function() {},
1286
+ beforeResume : function() {},
1287
  }, options);
1288
 
1289
  return this.each(function() {
js/jquery.crellyslider.min.js CHANGED
@@ -2,10 +2,10 @@
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: http://fabiorino1.altervista.org/projects/crellyslider
4
  * Description: The first free WordPress slider with elements animations.
5
- * Version: 0.6.7
6
  * Author: fabiorino
7
  * Author URI: http://fabiorino1.altervista.org
8
  * License: GPL2
9
  */
10
 
11
- (function(e){var t=function(t,n){function v(){r.wrapInner('<div class="crellyslider" />');r.find(i+" > ul").addClass("cs-slides");r.find(i+" "+s+" > li").addClass("cs-slide");a=e(r).find(i).find(s).find(o).length;if(a==0){return false}if(a==1){var t=r.find(i).find(s).find(o+":eq(0)");var u=r.find(i).find(s);t.clone().prependTo(u);a++}if(n.showControls){r.find(i).append('<div class="cs-controls"><span class="cs-next"></span><span class="cs-previous"></span></div>')}if(n.showNavigation){var c='<div class="cs-navigation">';for(var h=0;h<a;h++){c+='<span class="cs-slide-link"></span>'}c+="</div>";r.find(i).append(c)}if(n.showProgressBar){r.find(i).append('<div class="cs-progress-bar"></div>')}else{r.find(i).append('<div class="cs-progress-bar cs-progress-bar-hidden"></div>')}r.find(i).find(".cs-controls > .cs-previous").click(function(){l=false;I(M())});r.find(i).find(".cs-controls > .cs-next").click(function(){l=false;I(O())});r.find(i).find(".cs-navigation > .cs-slide-link").click(function(){if(e(this).index()!=f){l=false;I(e(this).index())}});if(n.pauseOnHover){r.find(i).find(s).hover(function(){C()});r.find(i).find(s).mouseleave(function(){k()})}if(n.responsive){e(window).resize(function(){E()})}b();g();if(document.readyState!="complete"){e(window).load(function(){m()})}else{m()}}function m(){y();r.find(i).find(s).find(o).each(function(){e(this).find(u).each(function(){var t=e(this);t.data("width",parseFloat(t.width()));t.data("height",parseFloat(t.height()));t.data("line-height",parseFloat(t.css("line-height")));t.data("letter-spacing",parseFloat(t.css("letter-spacing")));t.data("font-size",parseFloat(t.css("font-size")));t.data("padding-top",parseFloat(t.css("padding-top")));t.data("padding-right",parseFloat(t.css("padding-right")));t.data("padding-bottom",parseFloat(t.css("padding-bottom")));t.data("padding-left",parseFloat(t.css("padding-left")));t.css("display","none")});e(this).css({display:"none"})});if(n.responsive){E()}else{T()}}function g(){r.find(i).find(s).css("display","none");r.find(i).find(".cs-progress-bar").css("display","none");r.find(i).find(".cs-navigation").css("display","none");r.find(i).find(".cs-controls").css("display","none");r.find(i).append('<div class="cs-preloader"><div class="cs-loader"></div></div>')}function y(){r.find(i).find(s).css("display","block");r.find(i).find(".cs-progress-bar").css("display","block");r.find(i).find(".cs-navigation").css("display","block");r.find(i).find(".cs-controls").css("display","block");r.find(i).find(".cs-preloader").remove()}function b(){var e=n.layout;var t,u;switch(e){case"fixed":t=n.startWidth;u=n.startHeight;r.find(i).css({width:x(t),height:x(u)});r.find(i).find(s).find(o).css({width:x(t),height:x(u)});break;case"full-width":t=r.width();u=n.startHeight;r.find(i).css({width:t,height:x(u)});r.find(i).find(s).find(o).css({width:t,height:x(u)});break;default:return false;break}}function w(e){var t=(A()-n.startHeight)/2;var r=(L()-n.startWidth)/2;var i=0;var s=0;if(t>0){i=t}if(r>0){s=r}return{top:i,left:s}}function E(){var t=r.find(i).find(s).find(o);N();S();b();t.each(function(){var t=e(this).find(u);t.each(function(){var t=e(this);t.css({width:x(_(t,"width")),height:x(_(t,"height")),top:x(_(t,"top")+w(t).top),left:x(_(t,"left")+w(t).left),"padding-top":x(_(t,"padding-top")),"padding-right":x(_(t,"padding-right")),"padding-bottom":x(_(t,"padding-bottom")),"padding-left":x(_(t,"padding-left"))});if(t.text()!=""){t.css({width:"auto",height:"auto","line-height":x(_(t,"line-height"))+"px","letter-spacing":x(_(t,"letter-spacing")),"font-size":x(_(t,"font-size"))});if(t.width()>0){t.css("width",t.width())}if(t.height()>0){t.css("height",t.height())}}})});T()}function S(){var e=r.width();var t=n.startWidth;if(e>=t){d=1}else{d=e/t}}function x(e){return e*d}function T(){if(n.automaticSlide){H()}else{R(f)}}function N(){var t=r.find(i).find(s).find(o+":eq("+f+")");var n=t.find(u);r.find(i).find(s).find(o).each(function(){var t=e(this);t.finish();t.find(u).each(function(){var t=e(this);t.finish()})});j();h=false}function C(){var e=r.find(i).find(".cs-progress-bar");e.stop(true);c=true;if(!l){var t=r.find(i).find(s).find(o+":eq("+f+")");var n=t.children();t.finish();l=true}else{var u=setInterval(function(){if(c&&!l){clearInterval(u);c=false;C();return}if(!c){clearInterval(u);return}})}}function k(){c=false;var e=r.find(i).find(s).find(o+":eq("+f+")");var t=r.find(i).find(".cs-progress-bar");var n=D(e);var u=n-P(n,p);t.animate({width:"100%"},{duration:u,step:function(e){p=e},complete:function(){I(O())},easing:"linear"});l=false}function L(){return r.find(i).width()}function A(){return r.find(i).height()}function O(){if(f+1==a){return 0}return f+1}function M(){if(f-1<0){return a-1}return f-1}function _(e,t){var r;if(e.parent("ul").hasClass("cs-slides")){r=true}else{r=false}switch(t){case"ease-in":if(r){return isNaN(parseInt(e.data(t)))?n.slidesEaseIn:parseInt(e.data(t))}else{return isNaN(parseInt(e.data(t)))?n.elementsEaseIn:parseInt(e.data(t))}break;case"ease-out":if(r){return isNaN(parseInt(e.data(t)))?n.slidesEaseOut:parseInt(e.data(t))}else{return isNaN(parseInt(e.data(t)))?n.elementsEaseOut:parseInt(e.data(t))}break;case"delay":return isNaN(parseInt(e.data(t)))?n.elementsDelay:parseInt(e.data(t));break;case"time":if(r){return isNaN(parseInt(e.data(t)))?n.slidesTime:parseInt(e.data(t))}else{if(e.data(t)=="all"){return"all"}else{return isNaN(parseInt(e.data(t)))?n.itemsTime:parseInt(e.data(t))}}break;case"top":case"left":case"width":case"height":case"padding-top":case"padding-right":case"padding-bottom":case"padding-left":case"line-height":case"letter-spacing":case"font-size":return isNaN(parseFloat(e.data(t)))?0:parseFloat(e.data(t));break;case"in":case"out":return e.data(t);break;default:return false;break}}function D(e){return _(e,"time")+_(e,"ease-in")}function P(e,t){return t/100*e}function H(){q(f).done(function(){if(!l){f=O();N();H()}})}function B(e){var t=D(e);var n=r.find(i).find(".cs-progress-bar");j();n.animate({width:"100%"},{duration:t,step:function(e){p=e},easing:"linear"})}function j(){var e=r.find(i).find(".cs-progress-bar");p=0;e.stop();e.css({width:"0%"})}function F(){var t=r.find(i).find(".cs-navigation");var n=t.find("> .cs-slide-link");n.each(function(){var t=e(this);if(t.index()==f){t.addClass("cs-active")}else{t.removeClass("cs-active")}})}function I(e){var t=r.find(i).find(s).find(o+":eq("+f+")");var n=t.children();N();U(f,false);f=e;T()}function q(t){var n=r.find(i).find(s).find(o+":eq("+t+")");var u=new e.Deferred;B(n);F();R(t).done(function(){h=true});U(t,true).done(function(){u.resolve()});return u.promise()}function R(t){var n=r.find(i).find(s).find(o+":eq("+t+")");var u=n.children();var a=0;var f=new e.Deferred;in_dealy=false;z(n).done(function(){a++;if(a==2){f.resolve()}});u.each(function(){var t=e(this);X(t)}).promise().done(function(){a++;if(a==2){f.resolve()}});return f.promise()}function U(t,n){var u=r.find(i).find(s).find(o+":eq("+t+")");var a=u.children();var f=_(u,"time");var l=new e.Deferred;if(n){a.each(function(){var t=e(this);var n=_(t,"time");if(n!="all"){t.delay(n).queue(function(){e(this).dequeue();V(t)})}});u.delay(f).queue(function(){e(this).dequeue();h=false;l.resolve();W(u).done(function(){});a.each(function(){var t=e(this);var n=_(t,"time");if(n=="all"){t.delay(n).queue(function(){e(this).dequeue();V(t)})}})})}else{l.resolve();a.each(function(){var t=e(this);V(t)});W(u).done(function(){})}return l.promise()}function z(t){var n=_(t,"in");var r=_(t,"ease-in");var i=new e.Deferred;switch(n){case"fade":t.css({display:"block",top:0,left:0,opacity:0});t.animate({opacity:1},r,function(){i.resolve()});break;case"fadeLeft":t.css({display:"block",top:0,left:L(),opacity:0});t.animate({opacity:1,left:0},r,function(){i.resolve()});break;case"fadeRight":t.css({display:"block",top:0,left:-L(),opacity:0});t.animate({opacity:1,left:0},r,function(){i.resolve()});break;case"slideLeft":t.css({display:"block",top:0,left:L()});t.animate({left:0},r,function(){i.resolve()});break;case"slideRight":t.css({display:"block",top:0,left:-L()});t.animate({left:0},r,function(){i.resolve()});break;case"slideUp":t.css({display:"block",top:A(),left:0});t.animate({top:0},r,function(){i.resolve()});break;case"slideDown":t.css({display:"block",top:-A(),left:0});t.animate({top:0},r,function(){i.resolve()});break;default:t.css({display:"block",top:0,left:0});i.resolve();break}return i.promise()}function W(t){var n=_(t,"out");var r=_(t,"ease-out");var i=new e.Deferred;switch(n){case"fade":t.animate({opacity:0},r,function(){t.css({display:"none",opacity:1});i.resolve()});break;case"fadeLeft":t.animate({opacity:0,left:-L()},r,function(){t.css({display:"none",opacity:1,left:0});i.resolve()});break;case"fadeRight":t.animate({opacity:0,left:L()},r,function(){t.css({display:"none",opacity:1,left:0});i.resolve()});break;case"slideLeft":t.animate({left:-L()},r,function(){t.css({display:"none",left:0});i.resolve()});break;case"slideRight":t.animate({left:L()},r,function(){t.css({display:"none",left:0});i.resolve()});break;case"slideUp":t.animate({top:-A()},r,function(){t.css({display:"none",top:0});i.resolve()});break;case"slideDown":t.animate({top:A()},r,function(){t.css({display:"none",top:0});i.resolve()});break;default:t.css({display:"none"});i.resolve();break}return i.promise()}function X(e){var t=e.outerWidth();var n=e.outerHeight();var r=_(e,"in");var i=_(e,"ease-in");var s=_(e,"delay");var o=_(e,"top");var u=_(e,"left");switch(r){case"slideDown":e.delay(s).css({display:"block",top:-n,left:x(u+w(e).left)}).animate({top:x(o+w(e).top)},i);break;case"slideUp":e.delay(s).css({display:"block",top:A(),left:x(u+w(e).left)}).animate({top:x(o+w(e).top)},i);break;case"slideLeft":e.delay(s).css({display:"block",top:x(o+w(e).top),left:L()}).animate({left:x(u+w(e).left)},i);break;case"slideRight":e.delay(s).css({display:"block",top:x(o+w(e).top),left:-t}).animate({left:x(u+w(e).left)},i);break;case"fade":e.delay(s).css({display:"block",top:x(o+w(e).top),left:x(u+w(e).left),opacity:0}).animate({opacity:1},i);break;case"fadeDown":e.delay(s).css({display:"block",top:-n,left:x(u+w(e).left),opacity:0}).animate({top:x(o+w(e).top),opacity:1},i);break;case"fadeUp":e.delay(s).css({display:"block",top:A(),left:x(u+w(e).left),opacity:0}).animate({top:x(o+w(e).top),opacity:1},i);break;case"fadeLeft":e.delay(s).css({display:"block",top:x(o+w(e).top),left:L(),opacity:0}).animate({left:x(u+w(e).left),opacity:1},i);break;case"fadeRight":e.delay(s).css({display:"block",top:x(o+w(e).top),left:-t,opacity:0}).animate({left:x(u+w(e).left),opacity:1},i);break;case"fadeSmallDown":e.delay(s).css({display:"block",top:x(o+w(e).top-30),left:x(u+w(e).left),opacity:0}).animate({top:x(o+w(e).top),opacity:1},i);break;case"fadeSmallUp":e.delay(s).css({display:"block",top:x(o+w(e).top+30),left:x(u+w(e).left),opacity:0}).animate({top:x(o+w(e).top),opacity:1},i);break;case"fadeSmallLeft":e.delay(s).css({display:"block",top:x(o+w(e).top),left:x(u+w(e).left+30),opacity:0}).animate({left:x(u+w(e).left),opacity:1},i);break;case"fadeSmallRight":e.delay(s).css({display:"block",top:x(o+w(e).top),left:x(u+w(e).left-30),opacity:0}).animate({left:x(u+w(e).left),opacity:1},i);break}}function V(e){var t=e.outerWidth();var n=e.outerHeight();var r=_(e,"top");var i=_(e,"left");var s=_(e,"out");var o=_(e,"ease-out");switch(s){case"slideDown":e.animate({top:A()},o,function(){e.css({display:"none"})});break;case"slideUp":e.animate({top:-n},o,function(){e.css({display:"none"})});break;case"slideLeft":e.animate({left:-t},o,function(){e.css({display:"none"})});break;case"slideRight":e.animate({left:L()},o,function(){e.css({display:"none"})});break;case"fade":e.animate({opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeDown":e.animate({top:A(),opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeUp":e.animate({top:-n,opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeLeft":e.animate({left:-t,opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeRight":e.animate({left:L(),opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeSmallDown":e.animate({top:x(_(e,"top")+w(e).top+30),opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeSmallUp":e.animate({top:x(_(e,"top")+w(e).top-30),opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeSmallLeft":e.animate({left:x(_(e,"left")+w(e).left-30),opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeSmallRight":e.animate({left:x(_(e,"left")+w(e).left+30),opacity:0},o,function(){e.css({display:"none",opacity:1})});break}}var r=e(t);var i="div.crellyslider";var s="ul.cs-slides";var o="li.cs-slide";var u="> *";var a;var f=0;var l=false,c=false;var h=false;var p=0;var d=1;v()};e.fn.crellySlider=function(n){var r=e.extend({layout:"fixed",responsive:true,startWidth:1170,startHeight:500,pauseOnHover:true,automaticSlide:true,showControls:true,showNavigation:true,showProgressBar:true,slidesTime:3e3,elementsDelay:0,elementsTime:"all",slidesEaseIn:300,elementsEaseIn:300,slidesEaseOut:300,elementsEaseOut:300},n);return this.each(function(){new t(this,r)})}})(jQuery)
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: http://fabiorino1.altervista.org/projects/crellyslider
4
  * Description: The first free WordPress slider with elements animations.
5
+ * Version: 0.6.8
6
  * Author: fabiorino
7
  * Author URI: http://fabiorino1.altervista.org
8
  * License: GPL2
9
  */
10
 
11
+ (function(e){var t=function(t,n){function m(){r.wrapInner('<div class="crellyslider" />');r.find(i+" > ul").addClass("cs-slides");r.find(i+" "+s+" > li").addClass("cs-slide");a=e(r).find(i).find(s).find(o).length;if(a==0){return false}if(a==1){var t=r.find(i).find(s).find(o+":eq(0)");var u=r.find(i).find(s);t.clone().prependTo(u);a++}if(n.showControls){r.find(i).append('<div class="cs-controls"><span class="cs-next"></span><span class="cs-previous"></span></div>')}if(n.showNavigation){var c='<div class="cs-navigation">';for(var h=0;h<a;h++){c+='<span class="cs-slide-link"></span>'}c+="</div>";r.find(i).append(c)}if(n.showProgressBar){r.find(i).append('<div class="cs-progress-bar"></div>')}else{r.find(i).append('<div class="cs-progress-bar cs-progress-bar-hidden"></div>')}r.find(i).find(".cs-controls > .cs-previous").click(function(){l=false;q(_())});r.find(i).find(".cs-controls > .cs-next").click(function(){l=false;q(M())});r.find(i).find(".cs-navigation > .cs-slide-link").click(function(){if(e(this).index()!=f){l=false;q(e(this).index())}});if(n.pauseOnHover){r.find(i).find(s).hover(function(){k()});r.find(i).find(s).mouseleave(function(){L()})}if(n.responsive){e(window).resize(function(){if(v!=e(window).width()&&(n.layout=="full-width"&&A()!=e(r).width()||e(r).width()<A()||e(r).width()>A()&&A()<n.startWidth)){S()}})}w();y();if(document.readyState!="complete"){e(window).load(function(){g()})}else{g()}}function g(){b();v=e(window).width();r.find(i).find(s).find(o).each(function(){e(this).find(u).each(function(){var t=e(this);t.data("width",parseFloat(t.width()));t.data("height",parseFloat(t.height()));t.data("line-height",parseFloat(t.css("line-height")));t.data("letter-spacing",parseFloat(t.css("letter-spacing")));t.data("font-size",parseFloat(t.css("font-size")));t.data("padding-top",parseFloat(t.css("padding-top")));t.data("padding-right",parseFloat(t.css("padding-right")));t.data("padding-bottom",parseFloat(t.css("padding-bottom")));t.data("padding-left",parseFloat(t.css("padding-left")));t.css("display","none")});e(this).css({display:"none"})});n.beforeStart();if(n.responsive){S()}else{N()}}function y(){r.find(i).find(s).css("display","none");r.find(i).find(".cs-progress-bar").css("display","none");r.find(i).find(".cs-navigation").css("display","none");r.find(i).find(".cs-controls").css("display","none");r.find(i).append('<div class="cs-preloader"><div class="cs-loader"></div></div>')}function b(){r.find(i).find(s).css("display","block");r.find(i).find(".cs-progress-bar").css("display","block");r.find(i).find(".cs-navigation").css("display","block");r.find(i).find(".cs-controls").css("display","block");r.find(i).find(".cs-preloader").remove()}function w(){var e=n.layout;var t,u;switch(e){case"fixed":t=n.startWidth;u=n.startHeight;r.find(i).css({width:T(t),height:T(u)});r.find(i).find(s).find(o).css({width:T(t),height:T(u)});break;case"full-width":t=r.width();u=n.startHeight;r.find(i).css({width:t,height:T(u)});r.find(i).find(s).find(o).css({width:t,height:T(u)});break;default:return false;break}}function E(e){var t=(O()-n.startHeight)/2;var r=(A()-n.startWidth)/2;var i=0;var s=0;if(t>0){i=t}if(r>0){s=r}return{top:i,left:s}}function S(){n.beforeSetResponsive();var t=r.find(i).find(s).find(o);C();x();w();t.each(function(){var t=e(this).find(u);t.each(function(){var t=e(this);t.css({width:T(D(t,"width")),height:T(D(t,"height")),top:T(D(t,"top")+E(t).top),left:T(D(t,"left")+E(t).left),"padding-top":T(D(t,"padding-top")),"padding-right":T(D(t,"padding-right")),"padding-bottom":T(D(t,"padding-bottom")),"padding-left":T(D(t,"padding-left"))});if(t.text()!=""){t.css({width:"auto",height:"auto","line-height":T(D(t,"line-height"))+"px","letter-spacing":T(D(t,"letter-spacing")),"font-size":T(D(t,"font-size"))});if(t.width()>0){t.css("width",t.width())}if(t.height()>0){t.css("height",t.height())}}})});v=e(window).width();n.afterSetResponsive();N()}function x(){var e=r.width();var t=n.startWidth;if(e>=t){d=1}else{d=e/t}}function T(e){return e*d}function N(){if(n.automaticSlide){B()}else{U(f)}}function C(){var t=r.find(i).find(s).find(o+":eq("+f+")");var n=t.find(u);r.find(i).find(s).find(o).each(function(){var t=e(this);t.finish();t.find(u).each(function(){var t=e(this);t.finish()})});F();h=false}function k(){var e=r.find(i).find(".cs-progress-bar");e.stop(true);c=true;if(!l){n.beforePause();var t=r.find(i).find(s).find(o+":eq("+f+")");var u=t.children();t.finish();l=true;n.afterPause()}else{var a=setInterval(function(){if(c&&!l){clearInterval(a);c=false;k();return}if(!c){clearInterval(a);return}})}}function L(){n.beforeResume();c=false;var e=r.find(i).find(s).find(o+":eq("+f+")");var t=r.find(i).find(".cs-progress-bar");var u=P(e);var a=u-H(u,p);t.animate({width:"100%"},{duration:a,step:function(e){p=e},complete:function(){q(M())},easing:"linear"});l=false}function A(){return r.find(i).width()}function O(){return r.find(i).height()}function M(){if(f+1==a){return 0}return f+1}function _(){if(f-1<0){return a-1}return f-1}function D(e,t){var r;if(e.parent("ul").hasClass("cs-slides")){r=true}else{r=false}switch(t){case"ease-in":if(r){return isNaN(parseInt(e.data(t)))?n.slidesEaseIn:parseInt(e.data(t))}else{return isNaN(parseInt(e.data(t)))?n.elementsEaseIn:parseInt(e.data(t))}break;case"ease-out":if(r){return isNaN(parseInt(e.data(t)))?n.slidesEaseOut:parseInt(e.data(t))}else{return isNaN(parseInt(e.data(t)))?n.elementsEaseOut:parseInt(e.data(t))}break;case"delay":return isNaN(parseInt(e.data(t)))?n.elementsDelay:parseInt(e.data(t));break;case"time":if(r){return isNaN(parseInt(e.data(t)))?n.slidesTime:parseInt(e.data(t))}else{if(e.data(t)=="all"){return"all"}else{return isNaN(parseInt(e.data(t)))?n.itemsTime:parseInt(e.data(t))}}break;case"top":case"left":case"width":case"height":case"padding-top":case"padding-right":case"padding-bottom":case"padding-left":case"line-height":case"letter-spacing":case"font-size":return isNaN(parseFloat(e.data(t)))?0:parseFloat(e.data(t));break;case"in":case"out":return e.data(t);break;default:return false;break}}function P(e){return D(e,"time")+D(e,"ease-in")}function H(e,t){return t/100*e}function B(){R(f).done(function(){if(!l){f=M();C();B()}})}function j(e){var t=P(e);var n=r.find(i).find(".cs-progress-bar");F();n.animate({width:"100%"},{duration:t,step:function(e){p=e},easing:"linear"})}function F(){var e=r.find(i).find(".cs-progress-bar");p=0;e.stop();e.css({width:"0%"})}function I(){var t=r.find(i).find(".cs-navigation");var n=t.find("> .cs-slide-link");n.each(function(){var t=e(this);if(t.index()==f){t.addClass("cs-active")}else{t.removeClass("cs-active")}})}function q(e){var t=r.find(i).find(s).find(o+":eq("+f+")");var n=t.children();C();z(f,false);f=e;N()}function R(t){n.beforeSlideStart();var u=r.find(i).find(s).find(o+":eq("+t+")");var a=new e.Deferred;j(u);I();U(t).done(function(){h=true});z(t,true).done(function(){n.afterSlideEnd();a.resolve()});return a.promise()}function U(t){var n=r.find(i).find(s).find(o+":eq("+t+")");var u=n.children();var a=0;var f=new e.Deferred;in_dealy=false;W(n).done(function(){a++;if(a==2){f.resolve()}});u.each(function(){var t=e(this);V(t)}).promise().done(function(){a++;if(a==2){f.resolve()}});return f.promise()}function z(t,n){var u=r.find(i).find(s).find(o+":eq("+t+")");var a=u.children();var f=D(u,"time");var l=new e.Deferred;if(n){a.each(function(){var t=e(this);var n=D(t,"time");if(n!="all"){t.delay(n).queue(function(){e(this).dequeue();J(t)})}});u.delay(f).queue(function(){e(this).dequeue();h=false;l.resolve();X(u).done(function(){});a.each(function(){var t=e(this);var n=D(t,"time");if(n=="all"){t.delay(n).queue(function(){e(this).dequeue();J(t)})}})})}else{l.resolve();a.each(function(){var t=e(this);J(t)});X(u).done(function(){})}return l.promise()}function W(t){var n=D(t,"in");var r=D(t,"ease-in");var i=new e.Deferred;switch(n){case"fade":t.css({display:"block",top:0,left:0,opacity:0});t.animate({opacity:1},r,function(){i.resolve()});break;case"fadeLeft":t.css({display:"block",top:0,left:A(),opacity:0});t.animate({opacity:1,left:0},r,function(){i.resolve()});break;case"fadeRight":t.css({display:"block",top:0,left:-A(),opacity:0});t.animate({opacity:1,left:0},r,function(){i.resolve()});break;case"slideLeft":t.css({display:"block",top:0,left:A()});t.animate({left:0},r,function(){i.resolve()});break;case"slideRight":t.css({display:"block",top:0,left:-A()});t.animate({left:0},r,function(){i.resolve()});break;case"slideUp":t.css({display:"block",top:O(),left:0});t.animate({top:0},r,function(){i.resolve()});break;case"slideDown":t.css({display:"block",top:-O(),left:0});t.animate({top:0},r,function(){i.resolve()});break;default:t.css({display:"block",top:0,left:0});i.resolve();break}return i.promise()}function X(t){var n=D(t,"out");var r=D(t,"ease-out");var i=new e.Deferred;switch(n){case"fade":t.animate({opacity:0},r,function(){t.css({display:"none",opacity:1});i.resolve()});break;case"fadeLeft":t.animate({opacity:0,left:-A()},r,function(){t.css({display:"none",opacity:1,left:0});i.resolve()});break;case"fadeRight":t.animate({opacity:0,left:A()},r,function(){t.css({display:"none",opacity:1,left:0});i.resolve()});break;case"slideLeft":t.animate({left:-A()},r,function(){t.css({display:"none",left:0});i.resolve()});break;case"slideRight":t.animate({left:A()},r,function(){t.css({display:"none",left:0});i.resolve()});break;case"slideUp":t.animate({top:-O()},r,function(){t.css({display:"none",top:0});i.resolve()});break;case"slideDown":t.animate({top:O()},r,function(){t.css({display:"none",top:0});i.resolve()});break;default:t.css({display:"none"});i.resolve();break}return i.promise()}function V(e){var t=e.outerWidth();var n=e.outerHeight();var r=D(e,"in");var i=D(e,"ease-in");var s=D(e,"delay");var o=D(e,"top");var u=D(e,"left");switch(r){case"slideDown":e.delay(s).css({display:"block",top:-n,left:T(u+E(e).left)}).animate({top:T(o+E(e).top)},i);break;case"slideUp":e.delay(s).css({display:"block",top:O(),left:T(u+E(e).left)}).animate({top:T(o+E(e).top)},i);break;case"slideLeft":e.delay(s).css({display:"block",top:T(o+E(e).top),left:A()}).animate({left:T(u+E(e).left)},i);break;case"slideRight":e.delay(s).css({display:"block",top:T(o+E(e).top),left:-t}).animate({left:T(u+E(e).left)},i);break;case"fade":e.delay(s).css({display:"block",top:T(o+E(e).top),left:T(u+E(e).left),opacity:0}).animate({opacity:1},i);break;case"fadeDown":e.delay(s).css({display:"block",top:-n,left:T(u+E(e).left),opacity:0}).animate({top:T(o+E(e).top),opacity:1},i);break;case"fadeUp":e.delay(s).css({display:"block",top:O(),left:T(u+E(e).left),opacity:0}).animate({top:T(o+E(e).top),opacity:1},i);break;case"fadeLeft":e.delay(s).css({display:"block",top:T(o+E(e).top),left:A(),opacity:0}).animate({left:T(u+E(e).left),opacity:1},i);break;case"fadeRight":e.delay(s).css({display:"block",top:T(o+E(e).top),left:-t,opacity:0}).animate({left:T(u+E(e).left),opacity:1},i);break;case"fadeSmallDown":e.delay(s).css({display:"block",top:T(o+E(e).top-30),left:T(u+E(e).left),opacity:0}).animate({top:T(o+E(e).top),opacity:1},i);break;case"fadeSmallUp":e.delay(s).css({display:"block",top:T(o+E(e).top+30),left:T(u+E(e).left),opacity:0}).animate({top:T(o+E(e).top),opacity:1},i);break;case"fadeSmallLeft":e.delay(s).css({display:"block",top:T(o+E(e).top),left:T(u+E(e).left+30),opacity:0}).animate({left:T(u+E(e).left),opacity:1},i);break;case"fadeSmallRight":e.delay(s).css({display:"block",top:T(o+E(e).top),left:T(u+E(e).left-30),opacity:0}).animate({left:T(u+E(e).left),opacity:1},i);break}}function J(e){var t=e.outerWidth();var n=e.outerHeight();var r=D(e,"top");var i=D(e,"left");var s=D(e,"out");var o=D(e,"ease-out");switch(s){case"slideDown":e.animate({top:O()},o,function(){e.css({display:"none"})});break;case"slideUp":e.animate({top:-n},o,function(){e.css({display:"none"})});break;case"slideLeft":e.animate({left:-t},o,function(){e.css({display:"none"})});break;case"slideRight":e.animate({left:A()},o,function(){e.css({display:"none"})});break;case"fade":e.animate({opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeDown":e.animate({top:O(),opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeUp":e.animate({top:-n,opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeLeft":e.animate({left:-t,opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeRight":e.animate({left:A(),opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeSmallDown":e.animate({top:T(D(e,"top")+E(e).top+30),opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeSmallUp":e.animate({top:T(D(e,"top")+E(e).top-30),opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeSmallLeft":e.animate({left:T(D(e,"left")+E(e).left-30),opacity:0},o,function(){e.css({display:"none",opacity:1})});break;case"fadeSmallRight":e.animate({left:T(D(e,"left")+E(e).left+30),opacity:0},o,function(){e.css({display:"none",opacity:1})});break}}var r=e(t);var i="div.crellyslider";var s="ul.cs-slides";var o="li.cs-slide";var u="> *";var a;var f=0;var l=false,c=false;var h=false;var p=0;var d=1;var v=0;m()};e.fn.crellySlider=function(n){var r=e.extend({layout:"fixed",responsive:true,startWidth:1170,startHeight:500,pauseOnHover:true,automaticSlide:true,showControls:true,showNavigation:true,showProgressBar:true,slidesTime:3e3,elementsDelay:0,elementsTime:"all",slidesEaseIn:300,elementsEaseIn:300,slidesEaseOut:300,elementsEaseOut:300,beforeStart:function(){},beforeSetResponsive:function(){},afterSetResponsive:function(){},beforeSlideStart:function(){},afterSlideEnd:function(){},beforePause:function(){},afterPause:function(){},beforeResume:function(){}},n);return this.each(function(){new t(this,r)})}})(jQuery)
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: fabiorino
3
  Donate link: http://fabiorino1.altervista.org/projects/crellyslider/contribute-and-support/
4
  Tags: slider, slides, animations, drag & drop, drag and drop, layers, elements
5
- Requires at least: 3.0.1
6
- Tested up to: 3.9
7
- Stable tag: 0.6.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -54,6 +54,10 @@ You can find the documentation <a href="http://fabiorino1.altervista.org/project
54
 
55
  == Changelog ==
56
 
 
 
 
 
57
  = 0.6.7 =
58
  * Fixed "Add image" not working on Firefox and Internet Explorer
59
  * Fixed "Duplicate element" on animations
@@ -62,4 +66,4 @@ You can find the documentation <a href="http://fabiorino1.altervista.org/project
62
  * Fixed directory error
63
 
64
  = 0.6.5 =
65
- * Initial release.
2
  Contributors: fabiorino
3
  Donate link: http://fabiorino1.altervista.org/projects/crellyslider/contribute-and-support/
4
  Tags: slider, slides, animations, drag & drop, drag and drop, layers, elements
5
+ Requires at least: 3.5.0
6
+ Tested up to: 3.9.1
7
+ Stable tag: 0.6.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
54
 
55
  == Changelog ==
56
 
57
+ = 0.6.8 =
58
+ * Added callback functions: beforeStart, beforeSetResponsive, afterSetResponsive, beforeSlideStart, afterSlideEnd, beforePause, afterPause, beforeResume
59
+ * Fixed responsive methods that restarted the slide in particular moments uselessly
60
+
61
  = 0.6.7 =
62
  * Fixed "Add image" not working on Firefox and Internet Explorer
63
  * Fixed "Duplicate element" on animations
66
  * Fixed directory error
67
 
68
  = 0.6.5 =
69
+ * Initial release
wordpress/ajax.php CHANGED
@@ -24,7 +24,8 @@ function crellyslider_addSlider_callback() {
24
  'showControls' => $options['showControls'],
25
  'showNavigation' => $options['showNavigation'],
26
  'showProgressBar' => $options['showProgressBar'],
27
- 'pauseOnHover' => $options['pauseOnHover']
 
28
  ),
29
  array(
30
  '%s',
@@ -37,7 +38,8 @@ function crellyslider_addSlider_callback() {
37
  '%d',
38
  '%d',
39
  '%d',
40
- '%d'
 
41
  )
42
  );
43
 
@@ -70,6 +72,7 @@ function crellyslider_editSlider_callback() {
70
  'showNavigation' => $options['showNavigation'],
71
  'showProgressBar' => $options['showProgressBar'],
72
  'pauseOnHover' => $options['pauseOnHover'],
 
73
  ),
74
  array('id' => $options['id']),
75
  array(
@@ -84,6 +87,7 @@ function crellyslider_editSlider_callback() {
84
  '%d',
85
  '%d',
86
  '%d',
 
87
  ),
88
  array('%d')
89
  );
24
  'showControls' => $options['showControls'],
25
  'showNavigation' => $options['showNavigation'],
26
  'showProgressBar' => $options['showProgressBar'],
27
+ 'pauseOnHover' => $options['pauseOnHover'],
28
+ 'callbacks' => $options['callbacks'],
29
  ),
30
  array(
31
  '%s',
38
  '%d',
39
  '%d',
40
  '%d',
41
+ '%d',
42
+ '%s',
43
  )
44
  );
45
 
72
  'showNavigation' => $options['showNavigation'],
73
  'showProgressBar' => $options['showProgressBar'],
74
  'pauseOnHover' => $options['pauseOnHover'],
75
+ 'callbacks' => $options['callbacks'],
76
  ),
77
  array('id' => $options['id']),
78
  array(
87
  '%d',
88
  '%d',
89
  '%d',
90
+ '%s',
91
  ),
92
  array('%d')
93
  );
wordpress/css/admin.css CHANGED
@@ -274,6 +274,11 @@
274
  font-weight: bold;
275
  }
276
 
 
 
 
 
 
277
  .cs-admin #cs-slider-name {
278
  width: 100%;
279
  padding: 10px;
274
  font-weight: bold;
275
  }
276
 
277
+ .cs-admin textarea {
278
+ width: 100%;
279
+ height: 200px;
280
+ }
281
+
282
  .cs-admin #cs-slider-name {
283
  width: 100%;
284
  padding: 10px;
wordpress/frontend.php CHANGED
@@ -132,6 +132,7 @@ class CrellySliderFrontend {
132
  $output .= 'showNavigation: ' . $slider->showNavigation . ',' . "\n";
133
  $output .= 'showProgressBar: ' . $slider->showProgressBar . ',' . "\n";
134
  $output .= 'pauseOnHover: ' . $slider->pauseOnHover . ',' . "\n";
 
135
  $output .= '});' . "\n";
136
  $output .= '});' . "\n";
137
  $output .= '</script>' . "\n";
132
  $output .= 'showNavigation: ' . $slider->showNavigation . ',' . "\n";
133
  $output .= 'showProgressBar: ' . $slider->showProgressBar . ',' . "\n";
134
  $output .= 'pauseOnHover: ' . $slider->pauseOnHover . ',' . "\n";
135
+ $output .= $slider->callbacks . "\n";
136
  $output .= '});' . "\n";
137
  $output .= '});' . "\n";
138
  $output .= '</script>' . "\n";
wordpress/js/admin.js CHANGED
@@ -822,6 +822,7 @@ jQuery(document).ready(function($) {
822
  showNavigation : parseInt(content.find('#cs-slider-showNavigation').val()),
823
  showProgressBar : parseInt(content.find('#cs-slider-showProgressBar').val()),
824
  pauseOnHover : parseInt(content.find('#cs-slider-pauseOnHover').val()),
 
825
  };
826
 
827
  // Do the ajax call
822
  showNavigation : parseInt(content.find('#cs-slider-showNavigation').val()),
823
  showProgressBar : parseInt(content.find('#cs-slider-showProgressBar').val()),
824
  pauseOnHover : parseInt(content.find('#cs-slider-pauseOnHover').val()),
825
+ callbacks : content.find('#cs-slider-callbacks').val(),
826
  };
827
 
828
  // Do the ajax call
wordpress/slider.php CHANGED
@@ -219,6 +219,31 @@
219
  <?php _e('Pause the current slide when hovered.', 'crellyslider'); ?>
220
  </td>
221
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  </tbody>
223
  </table>
224
  </div>
219
  <?php _e('Pause the current slide when hovered.', 'crellyslider'); ?>
220
  </td>
221
  </tr>
222
+ <tr>
223
+ <td class="cs-name"><?php _e('Callbacks', 'crellyslider'); ?></td>
224
+ <td class="cs-content">
225
+ <?php
226
+ if(!$edit || ($edit && stripslashes($slider->callbacks) == '')) {
227
+ // Sorry for this ugly indentation, ajax compatibility problems...
228
+ ?>
229
+ <textarea id="cs-slider-callbacks">
230
+ beforeStart : function() {},
231
+ beforeSetResponsive : function() {},
232
+ afterSetResponsive : function() {},
233
+ beforeSlideStart : function() {},
234
+ afterSlideEnd : function() {},
235
+ beforePause : function() {},
236
+ afterPause : function() {},
237
+ beforeResume : function() {},</textarea>
238
+ <?php
239
+ }
240
+ else echo '<textarea id="cs-slider-callbacks">' . stripslashes($slider->callbacks) . '</textarea>';
241
+ ?>
242
+ </td>
243
+ <td class="cs-description">
244
+ <?php _e('Some jQuery functions that you can fire during the slider execution.', 'crellyslider'); ?>
245
+ </td>
246
+ </tr>
247
  </tbody>
248
  </table>
249
  </div>
wordpress/tables.php CHANGED
@@ -35,6 +35,7 @@ class CrellySliderTables {
35
  showNavigation INT,
36
  showProgressBar INT,
37
  pauseOnHover INT,
 
38
  UNIQUE KEY id (id)
39
  );";
40
 
35
  showNavigation INT,
36
  showProgressBar INT,
37
  pauseOnHover INT,
38
+ callbacks TEXT CHARACTER SET utf8,
39
  UNIQUE KEY id (id)
40
  );";
41