naeemqaswar
11/14/2016 - 10:39 AM

Internal to Inline CSS

Internal to Inline CSS

(function ($) {
    var rules = document.styleSheets[document.styleSheets.length-1].cssRules;
    for (var idx = 0, len = rules.length; idx < len; idx++) {
        $(rules[idx].selectorText).each(function (i, elem) {
            elem.style.cssText += rules[idx].style.cssText;
        });
    }
    $('style').remove();
    $('script').remove();
})(jQuery);