1.0.3 • Published 3 years ago

ajaxyjs-1.0.0 v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

How to use it ?

It is very easy to work with this tiny library.

First you need to import Ajaxy then call the ajaxy method .

Then use the output method and the rest depends on you.

Example :
import  Ajaxy from "./ajaxy.js"

// this is just an example

var result = document.querySelector("#result");
var url ="src/info.json"
var ajax = new Ajaxy("get",url,"text")

ajax.output = function(resp){
var datas = JSON.parse(resp)
for(var data of datas.cars){
result.innerHTML += " Brand : "+data.brand+"<br>" +" Year : "+data.year+ "<br>"+" Speed : "+data.speed +"<br><br>"

}



}

the parameter text is the responseType (responseType is the type of the file you are fetching)

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago