Created
May 8, 2018 09:36
-
-
Save 6ui11em/1c4fa47064de256944fb7defd0256f85 to your computer and use it in GitHub Desktop.
Magento 2 responsive javascript #magento2 #javascript #responsive #matchmedia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
'jquery', | |
'matchMedia', | |
'domReady!' | |
], function ($, mediaCheck) { | |
'use strict'; | |
/*...*/ | |
mediaCheck({ | |
media: '(min-width: 768px)', | |
// Switch to Desktop Version | |
entry: function () { | |
/* The function that toggles page elements from desktop to mobile mode is called here */ | |
}, | |
// Switch to Mobile Version | |
exit: function () { | |
/* The function that toggles page elements from mobile to desktop mode is called here*/ | |
} | |
}); | |
/*...*/ | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment