Hold on.... dig, dig, dig, dig

Here ya go

$("ul#navigation a").live("click", function(){
        var href=$(this).attr("href");
        $("#content-box").load(href);
        return false;
});

I've got all of my navigation in a un ordered list called "navigation"
(which is transformed by JQuery and css into a drop down menu)

The script hijacks the href attribute of the anchor and loads it into a div
called "content-box" 

I'm using the "live" function because it maintains the ajax binding..

Obviously the names can be changed to protect the innocent

-----Original Message-----
From: Erika L. Rich [mailto:[email protected]] 
Sent: Thursday, January 07, 2010 2:51 PM
To: cf-community
Subject: Re: new site layout critique


Got a simple sample of this sort of technique?

On Thu, Jan 7, 2010 at 2:40 PM, Scott Stewart
<[email protected]>wrote:

>
> Since I've been on a jQuery kick,
>
> Why not ajax load the content into a center div?
> Makes for a smooth transition between pages, and you're only loading the
> necessary content
>
>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:310087
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Reply via email to