View Single Post
  #1  
Old January 28th, 2015, 07:01 AM
brentwilliamz brentwilliamz is offline
 
Join Date: Dec 2014
Posts: 38
Default Order of inserted code in theme's header.php

Store ID: 46971
Website URL: Androids.net.au

As directed below, I've removed your code from Simple Search Widget module & pasted it into my Graphene's child theme header.php (so it doesn't get overwritten when parent theme is updated):

Code:
<script type="text/javascript">
<!--
/*
 * NOTE: This JS code would be much better off
 * existing in your theme's header.php file.
*/
function wash( anInput ) { if(anInput.value == anInput.defaultValue) anInput.value = ''; }
function checkWash( anInput ) { if(anInput.value == '') anInput.value = anInput.defaultValue; }
//-->
</script>
Is there any particular placement of for your code in the header.php file, eg. start or end of file? Or is this never critical?