TonyQ
$("body").on("click",function(){
console.log("hi");
});
Text
Text
$.get("/test",function(response){
console.log(response);
});
$(".my-btn".click(function(){
$.get("/test",function(response){
$(".my-div").html(response);
$(".my-div .my-specific-btn").on("click",function(){
$.post("/update",myparam,function(){
//show something
});
});
});
});
When need multiple data to render
$.get("/users",fucntion(data){
$.get("/articles",function(articles){
$.get("/advertise",function(advs){
render(data,articles,advs);
});
});
});
It's obviously not the best choice.
Response first
Lazy load
live coding
live coding