Bug Tracker

Opened 13 years ago

Closed 12 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:

Description

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:

$(document).ready(...);

A fix (thanks John):

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

Change History (2)

comment:1 Changed 13 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 12 years ago by john

Resolution: duplicate
Status: newclosed

Duplicate of #1698.

Note: See TracTickets for help on using tickets.