I make a point of placing any user-fired functions outside the $(document).ready(function () {
block even though (as below) they may include jQuery elements. With the proviso that the PlaceOrder()
function will not be called before the document is loaded this code works correctly.
function PlaceOrder() {
$("#BillMe").val($("#tbReferred").val());
confirmOrderForm.submit();
}
Should I expect the general concept to always hold true - that jQuery elements are able to be correctly resolved by any function that is assured to not fire before the DOM is ready?