[jQuery] Re: Designerly Ajax ? from newbie
Slightly more concise, not tested: function getContent(id, url) { $('#' + id).fadeOut(1200, function() { $('#' + id).load(url).fadeIn(1200); } } - Richard
[jQuery] Re: Designerly Ajax ? from newbie
I was able to get this to work: function getContent(){ $(#content).fadeOut(1200,function(){ showContent(); }); } function showContent(){ $(#content).load(EX_myNewAjax.html).fadeIn(1200); } wondering if there is a more concise way to write it -john-
[jQuery] Re: Designerly Ajax ? from newbie
Hi David, Thanks for your reply - progress being made however the jquery.load immediately loads the new AJAX content (it appears immediately) then it does both the fadeIn and fadeOut's Guessing that a trigger is needed to defer the showing of new AJAX content until AFTER fadeOut() has completed really hoping to get a working script cheers - john-
[jQuery] Re: Designerly Ajax ? from newbie
Just wanted to bump this (my first post) I suppose my question relates to chaining the commands mentioned in previous post (1)(2)(3) From a 'design point of view' the fadeOut and fadeIn treatment of AJAX calls really attracts me - and from what I gather jquery is in a unique position to accomplish this... just asking for a jump start here - rough scripts welcomed - cheers john
[jQuery] Re: Designerly Ajax ? from newbie
Hi Benjamin, OK, maybe I need to explain better I want to apply AJAX to a CMS pagination scheme (using a system generated navigation bar) where div id=content gets targeted and dynamically updated with AJAX - (no page refresh) So say the end user is on page 1 and clicks navigation bar to load page 2 (1) Page 1's div id=content would fadeOut (2) AJA X content would get retrieved and then loaded into now 'invisible' div id=content (myExternalContent.php?id=2) (3) div id=content would fadeIn to show new content So just an aesthetic way to handle 'page transitions' - not unlike an IE page transition filter Can this be done - have to think with jQuery this would be quite doable cheers - j- BTW - nice site
[jQuery] Re: Designerly Ajax ? from newbie
Hi John, You can use the load method to populate the #content div. Something like this should work: $(#content).fadeOut().load(http://myurl.com;).fadeIn(); Cheers, David jsw_nz wrote: Hi Benjamin, OK, maybe I need to explain better I want to apply AJAX to a CMS pagination scheme (using a system generated navigation bar) where div id=content gets targeted and dynamically updated with AJAX - (no page refresh) So say the end user is on page 1 and clicks navigation bar to load page 2 (1) Page 1's div id=content would fadeOut (2) AJA X content would get retrieved and then loaded into now 'invisible' div id=content (myExternalContent.php?id=2) (3) div id=content would fadeIn to show new content So just an aesthetic way to handle 'page transitions' - not unlike an IE page transition filter Can this be done - have to think with jQuery this would be quite doable cheers - j- BTW - nice site