skip to Main Content

Can jQuery chain ajax requests?

I have a few Ajax requests which will be executed sequentially. $.ajax({ url: 'https://dummyjson.com/products/1', success: (res) => { console.log(1, res); $.ajax({ url: 'https://dummyjson.com/carts/1', success: (res) => { console.log(2, res); $.ajax({ url: 'https://dummyjson.com/posts/1', success: (res) => { console.log(3, res); $.ajax({ url:…

VIEW QUESTION
Back To Top
Search