SSM with Colorbox brings together one of the best lightbox plugins with SimpleStateManager allowing you to enable and disable the lightbox based on the responsive state of the browser.
With the lightbox disabled the link simply goes to the next page link any other link.
To get started with ssm-colorbox you need to ensure you have the relevant dependancies
With the dependancies in place you can now add SSM with Colorbox to your project.
bower install ssm-colorbox
Using SSM with Colorbox is as simple as adding an extra value to your states to tell colorbox whether it should activate or not.
ssm.addState({ id: 'mobile', maxWidth: 767, colorbox: false }); ssm.addState({ id: 'tablet', minWidth: 768, maxWidth: 1023, colorbox: true }); ssm.addState({ id: 'desktop', minWidth: 1024, colorbox: true }); ssm.ready();
With this in place you are free to activate colorbox as you normally would passing the same options which can be found in the colorbox documentation
$('.the_lightbox').colorbox();
There are a number of browsers that we have tested support, as we test more browsers we will update this list
Anybody is welcome to contribute to this project, this is a community led library and you can get involved in the following ways
License: MIT (http://www.opensource.org/licenses/mit-license.php)
The MIT License (MIT)
Copyright (c) 2013 Jonathan Fielding
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.