Get normalized viewport dimensions across all your scripts... with verge.js!

About verge.js

verge is a compact set of cross-browser viewport utilities packed into an opensource JavaScript module. It provides methods to measure viewport dimensions and/or to detect if a DOM element is in the viewport.

As one can see at ryanve.com/lab/dimensions the verge approach offers the most precise results for viewport dimension measurement (browser window width and height) and is also the winner in cross-browser compatibility.

About this project

This project is split into 2 modules:

  • verge_lib
    This module just adds the verge.js library into drupal's library array; it doesn't have a user interface.
    It's main purpose is to be used as standard for any responsive/adaptive module working with viewport dimensions. Actually many modules are using their own scripts therefore; so measurement results vary a lot.
  • verge_lib_measure
    This small module stores the actual viewport dimensions, measured with verge.js, into a cookie. Any responsive module/theme working with breakpoints and/or media queries can easily make use of the results.
    Additionally the results can be displayed in a jQuery driven div. Therefore the module offers role permissions per theme and the option to disable the integrated css.

Dependencies

  1. libraries module (2.x)
  2. verge.js library

Installation

Install module and library as usual. Further informations can be found here:

Configuration

  • verge_lib does not have any configurable options.
  • verge_lib_measure offers role permissions and configurable options.

Integration

With this module developers can integrate verge.js methods into custom modules/scripts.

Project information

  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Project categories: Developer tools, Integrations
  • Created by R2-D8 on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    There are currently no supported stable releases.

Releases