My answer also includes some Tooraj magic.
Basically, we will use the same load function, and in the callback we are going to grab the script, take the functions from the inside, and then test them.
$("#container").load('/url #content', function(){ eval($('#container script').html()); });
using the selector above and capturing the HTML from this selector (which, as it turned out, are functions in the script), we can then eval to execute this function and run it.
This is where jsFiddle works.
source share