01/01/2017

Responsiville version 1.2

Responsiville version 1.2 is out. The documentation is totally revamped, the event system is complete and all the Responsiville modules are using it. You are encouraged to do so yourself. The Vanilla initialisation process has become simpler and automatic by default. Al the scripts, styles and settings flags are declared in config.php.

// Acquire the Responsiville singleton instance.
var responsiville = Responsiville.Main.getInstance();

// Do something when the framework has initialised.
responsiville.on( 'init', function () {

 // The "this" scope refers to the responsiville instance.
 console.dir( 'The Responsiville framework has initialised' );

});

// Do something when the current breakpoint changes.
responsiville.on( 'change', function () {

 // The "this" scope refers to the responsiville instance.
 console.dir( 'The breakpoint has changed to => ' + this.currentBreakpoint.name );

});

// Do something when the tablet breakpoint is entered.
responsiville.on( 'enter.tablet', function () {

 // The "this" scope refers to the responsiville instance.
 console.dir( 'The breakpoint has changed to tablet' );

});

// Do something when the tablet breakpoint is left.
responsiville.on( 'leave.tablet', function () {

 // The "this" scope refers to the responsiville instance.
 console.dir( 'The breakpoint is not tablet any more' );

});

Home page