I try to use the jQuery insertAfter to inject some source code inside the html page, but after I insert the code, and I view the source code, it can’t show the inserted code in the source code view, but in the actually UI, it is inserted on the page. What’s happen? Thank you.
Share
The reason you do not see it in the source code is that browsers do not update their source code when javascript makes dom changes. Your best bet is to use development tools to look at your code. depending on your browser you will have different choices
IE: Developer tools (F12)
Firefox: Firebug plugin
Chrome/Safari: Webkit developers tools, built in.