"I was just wondering if there were any performance differences"

.load, like *any* Ajax call in jQuery, ultimately uses the $.ajax
method, so other than a hit of one method calling another (which is
like nothing), there is no performance hit

On Oct 22, 4:55 am, Hogsmill <i...@hogsmill.com> wrote:
> Cheers, Richard - very useful.
>
> I usually use $.ajax because I return JSON, and, as you say, then I
> start 'munging' :-) I like the load call (for straight content insert
> applications) because it's way simpler and easier to read - I was just
> wondering if there were any performance differences, etc.? Probably
> not, I suspect - prob, uses the same code...
>
> Cheers,
>
> Steve
>
> On Oct 22, 3:53 am, "Richard D. Worth" <rdwo...@gmail.com> wrote:
>
> > .load() is really nice if all you're doing is loading some content into an
> > element. It's a nice convenience method.
>
> > If you're going to take the results of the ajax call and maybe put different
> > parts of the content in different places, or do some manipulation or other
> > munging on it before you add it to the page, then $.ajax() or $.get() will
> > be your best bet.
>
> > - Richard
>
> > On Wed, Oct 21, 2009 at 10:59 AM, Hogsmill <i...@hogsmill.com> wrote:
>
> > > I've been using $.ajax() for ages, and am now developing on a site
> > > where they alwats use load(). Does anybody know which is best (if
> > > either), ans pros and cons for each one?
>
> > > Cheers in advance,
>
> > > Hogsmill

Reply via email to