WebResourcesDepot

Advertise here with BSA


Enquire.js is a standalone JavaScript library for programmatically responding to CSS media queries.

The library allows us to define any number of media queries and fire events when they are matched (or not matched).

It is <1kb in size when minified + gzipped and makes any type of “if screen size is bigger/smaller than this, do that with JavaScript” possible.

Enquire.js

Real world examples may include displaying smaller images or hiding some page parts for mobile, running a different analytics tracking code for tablets, etc. CSS can only do some these things and JavaScript support adds a huge flexibility.

P.S. CSS-Tricks has a very nice write-up on the usage of Enquire.js. Make sure you check it if planning to use the library.

Advertisements:
Infragistics jQuery controls deliver the magic of HTML5, w/o sacrificing resources, time, or money.
Professional XHTML Admin Template ($15 Discount With The Code: WRD.)
SSLmatic – Cheap SSL Certificates (from $19.99/year)

Article published by Umut M. (This blog article was re-posted via RSS and all Rights Are Reserved to the original owners).

  1. codeclarity posted this