CootImatpeame
New Member
So I am a little confounded here. I do not understand why script executes when placed with jquery's \[code\].html()\[/code\] but not with \[code\]innerHTML\[/code\]. I looked at the source code for jQuery's \[code\].html\[/code\] and it still seemed that \[code\]innerHTML\[/code\] was being used. Can anyone explain this behavior?I came across this during an ajax response. I was getting back html and a \[code\]script\[/code\] tag with some javascript in it, and I usually use \[code\]html\[/code\], but for some reason had used \[code\]innerHTML\[/code\] this time thinking there was no difference.I understand that this might seem to be localized, so I made a jsFiddle with a timeout that behaves similar to an ajax response in order to highlight the issue.jsFiddle demonstrating the behavior