Transforming loaded content

Let's say we need to transform some of the content that we load in. Not a problem. There's a basic "success" callback function available. We can take advantage of it like so:

jQuery('.post:first').load(,about-2/ #post-104', function(){ jQuery(,h3,).css("color","#ff6 6 00");

jQuery('#post-104 p:first').css("font-weight","bold");

As you can see, the content is now "part" of our page, and a set of DOM objects as our h3s in the ajaxed content changed along with other selected matches on the page. Now this seems a lot more useful. I bet you can think of a lot of uses for functionality like this! Guess what — so can our "clients".

Was this article helpful?

0 0
Blogging For Business

Blogging For Business

Download this Guide And Discover How Start And Run Your Very Own Successful Business Blog. Always Wanted To Start Your Own Blog?

Get My Free Ebook

Post a comment