Added: jquery/jquery.xsajax.js =================================================================== --- jquery/jquery.xsajax.js (rev 0) +++ jquery/jquery.xsajax.js 2007-04-12 13:13:25 UTC (rev 26) @@ -0,0 +1,92 @@ +/* +** jquery.xsajax.js -- jQuery plugin for Cross-Site AJAX +** Copyright (c) 2007 Ralf S. Engelschall +** Licensed under GPL +** +** $LastChangedDate$ +** $LastChangedRevision$ +*/ + +(function($){ + $.extend({ + getScriptXS: function () { + /* determine arguments */ + var arg = { + 'url': null, + 'gc': true, + 'cb': null, + 'cb_args': null + }; + if (typeof arguments[0] == "string") { + /* simple usage */ + arg.url = arguments[0]; + if (typeof arguments[1] == "function") + arg.cb = arguments[1]; + } + else if (typeof arguments[0] == "object") { + /* flexible usage */ + for (var option in arguments[0]) + if (typeof arg[option] != "undefined") + arg[option] = arguments[0][option]; + } + + /* generate + + + +

jQuery XS AJAX Plugin Demo

+ output of script #1: (none)
+ output of script #2: (none) +

+

+ + + Added: jquery/jquery.xsajax.test1.js =================================================================== --- jquery/jquery.xsajax.test1.js (rev 0) +++ jquery/jquery.xsajax.test1.js 2007-04-12 13:13:25 UTC (rev 26) @@ -0,0 +1,8 @@ + +/* just produce some distinguishable output */ +$('span#output1').html("script #1 loaded"); +var i = 7; +setInterval(function () { + $('span#output1').html("i=" + i++); +}, 1000); + Added: jquery/jquery.xsajax.test2.js =================================================================== --- jquery/jquery.xsajax.test2.js (rev 0) +++ jquery/jquery.xsajax.test2.js 2007-04-12 13:13:25 UTC (rev 26) @@ -0,0 +1,8 @@ + +/* just produce some distinguishable output */ +$('span#output2').html("script #2 loaded"); +var j = 42; +setInterval(function () { + $('span#output2').html("j=" + j++); +}, 1000); +