2017 © Pedro Peláez
 

magento2-module magento2-module-enquire-js

Add Enquire.js from CDN as a require.js module shim. With fallback to local version when CDN is offline.

image

timneutkens/magento2-module-enquire-js

Add Enquire.js from CDN as a require.js module shim. With fallback to local version when CDN is offline.

  • Friday, May 4, 2018
  • by timneutkens
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5,621 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 21 % Grown

The README.md

Magento2 Enquire.js

Add Enquire.js from CDN as a require.js module shim. With fallback to local version when CDN is offline., (*1)

Installation

  1. composer require weprovide/magento2-module-enquire-js
    will install the latest version. If you want a specific Enquire.js version you can use this:
    composer require weprovide/magento2-module-enquire-js:<version here>, (*2)

  2. Run bin/magento setup:upgrade, (*3)

  3. Run bin/magento setup:static-content:deploy, (*4)

Available versions

  • 2.1.2
  • 2.1.6

Usage

For usage examples of enquire.js see the enquire.js website, (*5)

require(['enquire'], function (enquire) {
  enquire.register("screen and (max-width:1000px)", {

      match : function() {},      // OPTIONAL
                                  // If supplied, triggered when the media query transitions 
                                  // *from an unmatched to a matched state*

      unmatch : function() {},    // OPTIONAL
                                  // If supplied, triggered when the media query transitions 
                                  // *from a matched state to an unmatched state*.
                                  // Also may be called when handler is unregistered (if destroy is not available)

      setup : function() {},      // OPTIONAL
                                  // If supplied, triggered once immediately upon registration of the handler

      destroy : function() {},    // OPTIONAL
                                  // If supplied, triggered when handler is unregistered. Place cleanup code here

      deferSetup : true           // OPTIONAL, defaults to false
                                  // If set to true, defers execution the setup function 
                                  // until the media query is first matched. still triggered just once
  });
});

The Versions

04/05 2018

dev-master

9999999-dev

Add Enquire.js from CDN as a require.js module shim. With fallback to local version when CDN is offline.

  Sources   Download

MIT

The Requires

  • magento/framework ^100.0.0

 

by Tim Neutkens

04/05 2018

2.1.6

2.1.6.0

Add Enquire.js from CDN as a require.js module shim. With fallback to local version when CDN is offline.

  Sources   Download

MIT

by Tim Neutkens

31/10 2017

2.1.5

2.1.5.0

Add Enquire.js from CDN as a require.js module shim. With fallback to local version when CDN is offline.

  Sources   Download

MIT

by Tim Neutkens

31/10 2017

2.1.4

2.1.4.0

Add Enquire.js from CDN as a require.js module shim. With fallback to local version when CDN is offline.

  Sources   Download

MIT

by Tim Neutkens

13/10 2017

2.1.3

2.1.3.0

Add Enquire.js from CDN as a require.js module shim. With fallback to local version when CDN is offline.

  Sources   Download

MIT

by Tim Neutkens

06/08 2016

2.1.2

2.1.2.0

Add Enquire.js from CDN as a require.js module shim. With fallback to local version when CDN is offline.

  Sources   Download

MIT

The Requires

  • magento/framework ^100.0.0

 

by Tim Neutkens

05/08 2016

1.0.0

1.0.0.0

Add Enquire.js from CDN as a require.js module shim. With fallback to local version when CDN is offline.

  Sources   Download

MIT

The Requires

  • magento/framework ^100.0.0

 

by Tim Neutkens