• Hi,

    your inline code doesn’t work when jQuery is loaded lazy.
    For non render blocking loading methods its best to let jQuery load later.

    I see that you have thought about not loading your code on every page thats nice ??
    but it would be great to have a selection in admin panel to use external file, so autoptimize can minimize them.
    I also use asset cleanup to select what I want to load when, so your function it can easily rebuild for those who want to minimize there scripts.

    those are the lines I mean:

     $output .= "<style type='text/css'>.stcr-hidden{display: none !important;}</style>";
    				$output .= "<script type='text/javascript'>jQuery(document).ready(function($){var stcr_form=$('div.stcr-form');stcr_form.prevUntil('form').each(function(){var _this=$(this);if(_this.find(':input[type=\"submit\"]').length){stcr_form.remove(),_this.before(stcr_form);$('div.stcr-form').removeClass('stcr-hidden');return false;}})});</script>";

    PS: thanks for the nice plugin, I “forked” myself a working version so you don’t have to hurry

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Inline JavaScript / CSS not lazyloading compatible’ is closed to new replies.