Archive for the 'json-p-x' Category

Using YQL as a proxy for cross-domain Ajax

OK, this is nothing shockingly new, but I found it pretty useful. Using jQuery, Ajax has become more or less a one-liner:
PLAIN TEXT
JAVASCRIPT:

$(document).ready(function(){

  $(’.ajaxtrigger’).click(function(){

    $(’#target’).load($(this).attr(’href’));

    return false;

  });

});

This loads the document any link with a class of “ajaxtrigger” points to and updates the content of the element with the ID “target”. If [...]