• Home
  • About Jon Dowdle
  • Lifestream
  • Code from TDD Demystified through Kat...
    Passing

    A big thanks to everyone that came out for today's CFMeetup. The code is located here and the presentation is located here. While practicing for this presentation, I noticed [...]

    Read more
KEEP IN TOUCH

jQuery Ajax Loading with Selectors

Oct29
2008
Written by Jon Dowdle

If you don't know, jQuery can load a remote page into a DIV very easily. Not only that, it can also filter on which parts of that page get loaded.

First you have to use load method of the target div. For example if my div looks like <div id="target">, then my load call will look like $("div#target").load(  "file.html" );

The load method has more to offer than that though!

You can only load into your target div the sections of interest my specifying selectors after the url.

Ex.  $("div#target").load("file.html .targetClass"); will loading all of the elements in file.html with the class "targetClass".

To see this in action, see the live example here. The file being loaded is here.

Posted in Code - Tagged jQuery
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail
« cfqueryparam, NULLs and Lists
» Keep Current with Coldfusion Talk Around the World

Recent Posts

  • Code from TDD Demystified through Katas
  • Awesome Web Development Links Found This Week
  • Taggable Demo Video (now with more code)
  • Taggable Demo Video
  • New jQuery Plugin: Taggable

Categories

  • Code
    • MySQL
    • Programming
    • Web Design
  • coldfusion
  • Life
    • Events
  • Reviews
  • Uncategorized
  • Work

Tags

adobe barcamp barcamporlando coldfusion ComplexByteArrayException concat conferences decorator design pattern Events firebug Form fowa html IE ignite infection control iterator javascript job jQuery movies MySql orlando Photos pirate booty pirates plugins poll project python railo software development sql stackoverflow stax.net style taggable tags talk like a pirate tips & tricks tools twitter washington dc Web Design

RSS Syndication

  • All posts
  • All comments

EvoLve theme by Theme4Press  •  Powered by WordPress jDowdle.com