Archive for November 12, 2011

  • Adding custom method calls to the jQuery Rambling Slider

    November 12, 2011


    This post was originally published in the Rambling Labs Blog on November 12, 2011.


    The jQuery Rambling Slider v0.1.2 was released a couple of days ago. One of the features added was the ability to start and stop the slider like this:

    $('#slider').ramblingSlider('stop');
    $('#slider').ramblingSlider('start');
    

    Every serious jQuery plugin has some way to change it’s behaviour or query some data after initialized and the general approach for this is calling the custom methods as showed above.

    It is well known that in order to do this, you have to perform some dynamic method calling magic. This is what you find in the jQuery documentation:

    (function($){
      var methods = {
        init : function(options) { /*...*/ },
        show : function() { /*…

    Continue Reading →