<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Eric,</div><div><br></div>I didn't move jQuery down...I actually moved it up higher so that it gets included before $HEAD content.<div><br></div><div>addEvent methods should still work as long as they're not called from inline javascript, b/c master.js is the first javascript included in the footer.</div><div><br></div><div>Scott</div><div><br><div><div>On Mar 8, 2011, at 7:03 AM, Eric M Martinez wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Scott,<div><br></div><div>I'm not sure this is best. I don't know if you moved jQuery as well, but that definitely needs to be in the head. Also, if anyone is using the "addEvent" method (formerly in lib.js) to attach methods to the window.load (per best practices), those are likely to fail as well. Finally, the latest from Google suggests the analytics (asynchronous snippet) should be in-line in the head as well. Maybe we would do better to do something like:</div><div><br></div><div><br></div><div>head.inc.php:</div><div>-----------------------------------------------------------------</div><div><font class="Apple-style-span" face="Courier">...</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="Courier">        </font></span><font class="Apple-style-span" face="Courier">include_once 'master.js.php';</font></div><div><font class="Apple-style-span" face="Courier"></head></font></div>-----------------------------------------------------------------<div><br><div><br></div><div>master.js.php:</div>-----------------------------------------------------------------<div><font class="Apple-style-span" face="Courier"><script type="text/javascript" src="jQuery-1.5.0.js"/></font></div><div><font class="Apple-style-span" face="Courier"><script type="text/javascript" src="master.js"/></font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">// Other HEAD section scripts</font></div><div><font class="Apple-style-span" face="Courier">// ... maybe cat/pack all HEAD scripts into a single script (including jQuery)</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"></font><span class="Apple-style-span" style="font-family: Courier; "><script type="text/javascript">/**<![CDATA[*/</span></div><div><span class="Apple-tab-span" style="white-space: pre; "><font class="Apple-style-span" face="Courier">        </font></span><font class="Apple-style-span" face="Courier">// In-line script for Google Analytics</font></div><div><font class="Apple-style-span" face="Courier">/**]]>*/</script></font></div>-----------------------------------------------------------------</div><div><br></div><div><br><div>master.js:</div>-----------------------------------------------------------------<div><font class="Apple-style-span" face="Courier">// contents of lib.js + searchbox js + other template scripts</font></div><div>-----------------------------------------------------------------</div><div><br></div><div><br></div><div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Reference:</div><div><span class="Apple-tab-span" style="white-space:pre">        <a href="http://www.google.com/support/googleanalytics/bin/answer.py?answer=174090">http://www.google.com/support/googleanalytics/bin/answer.py?answer=174090</a></span></div><div><span class="Apple-tab-span" style="white-space:pre"></span><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;"><br class="Apple-interchange-newline"></span></span></div></div></span></span></div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Thanks,</div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>~Eric.<br></div><div><br></div><br></div></span><br class="Apple-interchange-newline"> </div><br><div><div>On Mar 7, 2011, at 3:17 PM, Scott Haefner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi web devs,<br><br>On both ehpdevel and ehpstage:<br><br>1. I updated jQuery to 1.5.1. We have been running jQuery 1.5 on ehpdevel for several weeks now.<br>2. I removed lib.js from the <head> and added its functions to a new file called master.js that's included in the foot section.<br><br>If your apps use jQuery and/or functions like hasClass or addEvent from lib.js, you should check to be sure they still work properly. Because the functions from lib.js are now included at the bottom of the page, inline javascripts relying on these functions will break. If you're following "best practices" (and not including javascript inline) these changes will not likely affect you.<br><br>We will push these changes to earthquake on Wednesday, Mar 9.<br><br>Scott<br>_______________________________________________<br>EHPweb mailing list<br><a href="mailto:EHPweb@geohazards.usgs.gov">EHPweb@geohazards.usgs.gov</a><br><a href="https://geohazards.usgs.gov/mailman/listinfo/ehpweb">https://geohazards.usgs.gov/mailman/listinfo/ehpweb</a><br></div></blockquote></div><br></div></div></div></blockquote></div><br></div></body></html>