Archive | ajax

RSS feed for this section

Using Fetch

Whenever we send or retrieve information with JavaScript, we initiate a thing known as an Ajax call. Ajax is a technique to send and retrieve information behind the scenes without needing to refresh the page. It allows browsers to send and retrieve information, then do things with what it gets back, like add or change HTML on the page.

Let’s take a look at the history of that and then bring ourselves up-to-date.

Another note here, we’re going to be …


Using Fetch is a post from CSS-Tricks

Animate in Ajax’d Content to its Natural Height

Let’s combine three things we just learned here on CSS-Tricks:

One, transitioning to auto dimensions. Two, Ajaxing for stuff in a modern way. Three, waiting for images to be loaded to measure them.

With all these three things in our toolbox, we can Ajax for some arbitrary content and insert it onto the page with a revealing height animation. Tricky tricky!

Here’s the final demo:

See the Pen Slide in Ajax Content by Chris Coyier (@chriscoyier) on …


Animate in Ajax’d Content to its Natural Height is a post from CSS-Tricks

Need to do Dependency-Free Ajax?

One of the big reasons to use jQuery, for a long time, was how easy it made Ajax. It has a super clean, flexible, and cross-browser compatible API for all the Ajax methods. jQuery is still mega popular, but it’s becoming more and more common to ditch it, especially as older browser share drops and new browsers have a lot of powerful stuff we used to learn on jQuery for. Even just querySelectorAll is often cited as a reason to …


Need to do Dependency-Free Ajax? is a post from CSS-Tricks