diff --git a/ChangeLog b/ChangeLog index 3db1bfa2..4fb7755c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ was empty, we could not go in. * Removed packed versions of files, uglifing would be doing on-a-fly +* Added ability to use ajax without jquery. + 2012.08.24, Version 0.1.6 diff --git a/client.js b/client.js index 4d1bb9e1..c79db88a 100644 --- a/client.js +++ b/client.js @@ -135,7 +135,23 @@ CloudClient.Utils = (function(){ * jquery could be droped out */ this.ajax = function(pParams){ - $.ajax(pParams); + if($) + $.ajax(pParams); + else{ + var xmlhttp; + xmlhttp = new XMLHttpRequest(); + + var lMethod = 'GET'; + if(pParams.method) + lMethod = pParams.method; + + xmlhttp.onreadystatechange = function(){ + xmlhttp.open(lMethod, pParams.url, true); + xmlhttp.send(null); + }; + + } + }; /* setting function context (this) */