I have a very simple script:
For this code, I was expecting a <script> tag appended to <head> element with an id attribute of 'myScript', however jQuery lost the id attribute.
Dig into its source code, after the calling sequence "appendTo -> append -> domManip -> buildFragment", jQuery filters out all <script> tag to the "scripts" variable, and use .ajax method to load them, which certainly would create a new <script> tag without any custom attribute.
For this inconsistant behavior, is it possible that replace the .ajax call part, instead create a <script> element, merge all attributes to the new element, and then append it to a reasonable place.
By the way, this bug also puts the <script> element to a wrong place (as the first element of <head>, not the behavior of "append")