function supportCss3(style) { var prefix = ['webkit', 'Moz', 'ms', 'o'], humpString = [], htmlStyle = document.documentElement.style, _toHumb = function (string) { return string.replace(/-(\w)/g, function ($0, $1) { return $1.toUpperCase(); }); }; for ( var i in prefix ) { humpString.push(_toHumb(prefix[i] + '-' + style)); } humpString.push(_toHumb(style)); for ( var i in humpString ) { if ( humpString[i] in htmlStyle ) return true; } return false; } (function ($) { if ( !supportCss3('flex-direction') ) { var fontSize = parseFloat($('.wpkj-section>.wpkj-container>.wpkj-row').css('font-size')); $('.wpkj-section>.wpkj-container>.wpkj-row>*').css('font-size', fontSize); $('html').addClass('no-flex'); } })(jQuery);