Custom jquery added to order form causing issues - help

Hi Mike,

It seems like there’s some kind of conflict with some default cart scripting.

Try jquery no conflict, it worked for me when running in the browser, so hopefully it works for you.

What we’re trying to do here is set j to call jquery instead of $ preventing problems. You can replace j if you like.

<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
    var j = jQuery.noConflict();
    j(document).ready(function(){
		j('form input[id="firstName"]').attr("readonly", true);
      j('form input[id="firstName"]').css('background-color' , '#DEDEDE');
        j('form input[id="lastName"]').attr("readonly", true);
      j('form input[id="lastName"]').css('background-color' , '#DEDEDE');
        j('form input[id="emailAddress"]').attr("readonly", true);
      j('form input[id="emailAddress"]').css('background-color' , '#DEDEDE');
    });
</script>
1 Like