Created
August 11, 2016 06:10
-
-
Save al5dy/9810770ddd808461d93390b0a148ef28 to your computer and use it in GitHub Desktop.
Легкий способ найти текущий тип Bootstrap экрана.
This file contains 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
findPoint : function () { | |
var envs = ['xs', 'sm', 'md', 'lg']; | |
$el = $('<div>'); | |
$el.appendTo($('body')); | |
for (var i = envs.length - 1; i >= 0; i--) { | |
var env = envs[i]; | |
$el.addClass('hidden-'+env); | |
if ($el.is(':hidden')) { | |
$el.remove(); | |
return env | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment