An AJAX option to remember

I always forget how useful is the “$(<selector>).load(‘url’, {para: meter});” function on jQuery.

It is really a problem solver when loading HTML structures.  I am converting some old code where I got HTML fragments to replace some existing content on the page and using the usual process, I’d have to do the AJAX query, call a callback procedure and then there I’d replace the contents of the section / div / whatever I wanted.

With jQuery.load I can do that on a single call and in a more effective way.

Silly thing and so simple that I always keep forgetting about it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s