I read up about $(document).ready() and my understanding is that if forces the script to load before anything else on the page. So here's what I have...
Code:
<script type="text/javascript">
$(document).ready(function () {
if($("#shippingAddress-checkbox").attr("checked") == "checked")
{
$("#shippingField input:not(#shippingAddress-checkbox), #shippingField select:not(#shippingAddress-checkbox)").attr("disabled", "disabled");
}
else
{
$("#shippingField input:not(#shippingAddress-checkbox), #shippingField select:not(#shippingAddress-checkbox)").removeAttr("disabled");
}
$("#shippingAddress-checkbox").click(function(){
if($(this).attr("checked") == "checked")
{
$("#shippingField input:not(#shippingAddress-checkbox), #shippingField select:not(#shippingAddress-checkbox)").attr("disabled", "disabled");
}
else
{
$("#shippingField input:not(#shippingAddress-checkbox), #shippingField select:not(#shippingAddress-checkbox)").removeAttr("disabled");
}
});?
</script>
I put it on tpl_modules_no_account.php. Nothing, nothing nothing. I have spent an entire day pasting this code in every possible variation in every possible file in every possible position.
Can someone save the remainder of hair I have left?