If you want to use KnockoutJS...
Then: Yikes! Don't mix jQuery and Knockout like that. If you're using Knockout, try to keep your view "dumb", i.e. a reflection of the state of your view models. Use Knockout's data-binding features to fill the view instead. So e.g.:
<span id="Amount" data-bind="text: amount"></span>
self.amount = ko.observable(<?php echo $userProvidedAmount ; ?>);
Typically you don't want to mix PHP and JS that directly, and you'll have something like this instead:
<span id="Amount" data-bind="text: amount"></span>
<script>
window.myNamespace.initialData = {
amount: <?php echo $userProvidedAmount ; ?>
};
</script>
self.amount = ko.observable(window.myNamespace.initialData.amount);
Or whatever way your framework or homebrew setup analogously allows.
If you don't necessarily want to use KnockoutJS...
Having said all that, if you're not going to use KnockoutJS, you should look at @KWeiss' answer.