1

Closed

Document.ready() incorrectly minified

description

AjaxMin minifies this
$(document).ready(function () {

    // auto postback on dropdownlists change using HTML5 data- attribute to wire up the postback
    $('select[data-autopostback="true"]').change(function () {
        $(this).closest('form').submit();
    });

});
into this
document).ready(function(){$('select[data-autopostback="true"]').change(function(){$(this).closest('form').submit();});}
While JSCompress online correctly minifies to this:
$(document).ready(function(){$('select[data-autopostback="true"]').change(function(){$(this).closest("form").submit()})});
Closed Sep 26, 2016 at 3:43 PM by sekeatin
User was using the wrong minify function. No action needed.

comments

markoh wrote Sep 25, 2016 at 8:25 PM

Sorry, this was my mistake. I was using MinifyStylesheet() function on JS instead of MinifyJavaScript().