- Overview
- Documents
ViewportWatcher is a jquery plugin that handles window's width change for responsive web design
Depends
- EveEve
- viewportSize
- jQuery 1.10.2
Browsers
IE6+ and other new browsers.
Source: github.com
Oct 15, 2014 in Layout 3206 views
ViewportWatcher is a jquery plugin that handles window's width change for responsive web design
Depends
Browsers
IE6+ and other new browsers.
Source: github.com
1. INCLUDE JS FILES
<script src="../../libs/jquery/1.10.2/jquery.js"></script> <script src="../../viewportSize/viewportSize.js"></script> <script src="../../EveEve/eveeve.js"></script> <script src="../../jquery.viewportwatcher.js"></script>
2. JAVASCRIPT
var watcher = new $.ViewportWatcher(function(o) { o.when(function(width) { if(width < 800) { return true; } return false; }, { match: function() { // do something } }); o.when(function(width) { if(800 <= width) { return true; } return false; }, { match: function() { // do something } }); });
Tagged with:
viewportwatcher
window's width
responsive
web design
width change
jquery viewportwatcher
viewport
Related Articles