I'm guessing that the template code is being executed in an event handler.
So your code adds an event listener to the ready
event which has already executed once and will not be executed again.
So try moving
$("#name").css("text-decoration","underline");
under the #name
tag and remove the ready event and see if it works.
Example:
<h2 id="name">FULL NAME</h2>
<script type="text/javascript">
$("#name").css("text-decoration","underline");
</script>