Responsive.js aids you achieve responsive web design, allowing you to set callbacks between different screen resolutions.
Set functions to execute whenever the window size enters/exits a given range.
For example, you could move the main navigation to the bottom when the screen gets too small.
$.responsive()
.from(0,500)
.enter(function(){
//execute code when the window size is between 0 and 500
})
.enter(function(){
//execute more code when the window size is between 0 and 500
})
.from(500,720)
.enter(function(){
//execute code when the window size is between 500 and 720
})
.exit(function(){
//execute code when the window size exits this range (ej. screens bigger than 500)
})- $.responsive()
Initialize plugin - $.responsive().from(from,to,key)
Sets a range
- from: min width
- to: max width
- key: range name
- $.responsive().from(from,to).enters(callback)
Sets a callback to execute when the screen size enters the given range - $.responsive().from(from,to).exits(callback)
Sets a callback to execute when the screen size enters the given range - $.responsive().start()
Starts plugin - $.responsive().stop()
Stop plugin