unscriptable/curl — Issue #29: issue with multiple .next statements
Author: joopringelberg
Created: 2011-10-20 20:11:50+00:00
State: open

I may not understand the intended meaning of the .next statement. However, I am trying to do the following: stage loading of files in tranches before the main code executes.

File testNext.html:

stepOne.js:
var testOne;

$(document).ready(function()
{
testOne = function() { $( 'body' ).append("

Test One!

") }
});

stepTwo.js:
var testTwo;

$(document).ready(function()
{
testTwo = function() { $( 'body' ).append("

Test Two!

") }
});

On loading the page, a single alert box appears saying "2". The console shows "testTwo is not defined". Inspecting the page shows that a script element has been made for stepOne.js, but not for stepTwo.js. So it looks as if the requirement for the first .next statement has been fulfilled, but its callback is NOT executed; and the requirement for the second .next statement has not been fulfilled, but its callback has been executed.
Thanks,
Joop