Last Updated: February 25, 2016
·
694
· vccabral

replaceWith & Load combined.

Use

$.fn.loadWith = function(u){
    var c=$(this);
    $.get(u,function(d){
        c.replaceWith(d);
    });
};

as a jquery replace with to combine load and replaceWith functionality.