Script tags added via jQuery not visible in FireBug
问题 I am adding <script type="text/javascript" src="http://somedomain/somescript.js"> to the document head via jQuery. This is the code I use: $(document).ready(function () { var s = document.createElement("script"); s.type = "text/javascript"; s.src = (document.location.protocol == "https:" ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js"; $("head").append(s); }); While the script seems to be working perfectly, I do not see the scripts in the head when I use FireBug to inspect