Create an AJAX call

Simple jauery ajax call


            var eventsParam = {
                "url": url,
                "data": {
                    limit: config.size,
                    page: config.page++,
                },
                "method": "GET"
            };
$.ajax(eventsParam).done(function (res) {
    if(res.status == "success") {
       console.log(res)
    } else {
       console.log(res)
    }
}).error(function(err) {
    console.log(err.responseText);
});

Published by Santosh Shah

My name is Santosh Shah and blogs at santosh-shah.com

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.