I have a list containing news articles in the backend of a site which is then displayed on a homepage. I'd like the homepage to always display the most recent news. 

I've never used AJAX before but in pseudo it would need to do the following:

* call the homepage using an AJAX-get
* Compare the article div with the same div from the AJAX-get.
* If the AJAX-get has different content inside the div, display that

Can I do this with Jquery load, or do I need to go into AJAX for this functionality. and if so, could anyone give me a hand with the AJAX itself

trying to use AJAX, i have started using the following code, to no avail

```
$.ajax({
    url: ctx.HttpRoot,
    data: { "id": $("newsSliderWrapper").attr("id") },
    success: function (data) {
        data = $(data).find('div#newsSliderWrapper')
        alert(data)
    },
    error: function () {
        // your error logic
        alert("AJAX failed");
    }
})

```