Javascript - JQuery simulate ajax call (mock)

Oscar Brito


LINK:
https://github.com/anasnakawa/jquery.ajax.fake


<script src="jquery.ajax.fake.js"></script>
<script src="webservices.fake.js"></script>

Simulate a web service return value:

$.ajax.fake.registerWebservice('http://api.twitter.com/1/statuses/usertimeline.json?screenname=anasnakawa', function(data) {
return [{
"text": "hey this is fake #tweet, retweet please :) #retweet"
}]
});





Visit www.divhide.com for more informations, contacts and news about Web Development.
See other blog posts at blog.divhide.com.



Divhide purpose is to follow the HTML5 movement and contribute with applications which prove the quality of technology.


Feel free to contact divhide.