Bug Tracker

Opened 15 years ago

Closed 15 years ago

#1654 closed bug (duplicate)

AJAX inserted Javascript (<script>) code not executing when document ready.

Reported by: zackgilbert Owned by:
Priority: major Milestone: 1.2.1
Component: ajax Version: 1.2
Keywords: Cc:
Blocked by: Blocking:


When a snippet of code is insert into a page with AJAX, any <script> located within the snippet is executed as the document is getting parsed and not after the snippet is actually inserted.

Sample code (that doesn't work) - Located in the file being loaded with AJAX:


A fix (thanks John):

$(document).ready(function(){ setTimeout(..., 10); });

Change History (2)

comment:1 Changed 15 years ago by diz

I think that this is the same bug as the one described here:

http://dev.jquery.com/ticket/1698 (with patch available)

comment:2 Changed 15 years ago by john

Resolution: duplicate
Status: newclosed

Duplicate of #1698.

Note: See TracTickets for help on using tickets.