Created
April 21, 2017 16:00
-
-
Save joe-dempsey/b673afb06a2ed73e2ce5c246aaf50a58 to your computer and use it in GitHub Desktop.
target devices with js
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
| // useful example | |
| if ($(window).width() < 1024) { | |
| $( ".header__item-language" ).insertBefore( "#lang_inject_mobile" ); | |
| } | |
| $( window ).resize(function() { | |
| // position the lang picker when resizing | |
| if ($(window).width() < 1024) { | |
| $( ".header__item-language" ).insertBefore( "#lang_inject_mobile" ); | |
| } else { | |
| $( ".header__item-language" ).insertBefore( "#lang_re_inject" ); | |
| } | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment