[jQuery] Re: noob question - load function - dynamic content to slide in place
Glad to have pointed you in a good direction. On 7/24/07, tonywhite [EMAIL PROTECTED] wrote: Cool - I get it now. I found that my problem was really that the target div for inserting my HTML wasn't set to display:none; to begin with, so animating it to a block state was just not happening. Thanks for your response - I appreciate the group. On Jul 24, 11:08 am, Benjamin Sterling [EMAIL PROTECTED] wrote: Tony, try: (for an ID) $('#emptyDiv').load(externalHTML, function(){ $(this).slideDown('slow'); }); (for a class) $('.emptyDiv').load(externalHTML, function(){ $(this).slideDown('slow'); }); On 7/24/07, tonywhite [EMAIL PROTECTED] wrote: I'm new to jQuery and can't figure this one out. Instead of using an ajax get and innerHTML to load in external html, I can just use jQuery's load function: $(emptyDiv).load(externalHTMLFile); which I like! I would like to do is make better use of the graceful animations that jQuery has. I would prefer that the external HTML not show up so suddenly, but instead to slide or fade in place. It's not clear to me how to make that happen. I tried chaining, but by the time the content is loaded, the chained animation doesn't really do the trick: $emptyDiv).load(externalHTMLFile, function() {$emptyDiv.slideDown('slow');}); If you know of answer, please share. Thanks for any help. Tony -- Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
[jQuery] Re: noob question - load function - dynamic content to slide in place
Tony, try: (for an ID) $('#emptyDiv').load(externalHTML, function(){ $(this).slideDown('slow'); }); (for a class) $('.emptyDiv').load(externalHTML, function(){ $(this).slideDown('slow'); }); On 7/24/07, tonywhite [EMAIL PROTECTED] wrote: I'm new to jQuery and can't figure this one out. Instead of using an ajax get and innerHTML to load in external html, I can just use jQuery's load function: $(emptyDiv).load(externalHTMLFile); which I like! I would like to do is make better use of the graceful animations that jQuery has. I would prefer that the external HTML not show up so suddenly, but instead to slide or fade in place. It's not clear to me how to make that happen. I tried chaining, but by the time the content is loaded, the chained animation doesn't really do the trick: $emptyDiv).load(externalHTMLFile, function() {$emptyDiv.slideDown('slow');}); If you know of answer, please share. Thanks for any help. Tony -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
[jQuery] Re: noob question - load function - dynamic content to slide in place
Cool - I get it now. I found that my problem was really that the target div for inserting my HTML wasn't set to display:none; to begin with, so animating it to a block state was just not happening. Thanks for your response - I appreciate the group. On Jul 24, 11:08 am, Benjamin Sterling [EMAIL PROTECTED] wrote: Tony, try: (for an ID) $('#emptyDiv').load(externalHTML, function(){ $(this).slideDown('slow'); }); (for a class) $('.emptyDiv').load(externalHTML, function(){ $(this).slideDown('slow'); }); On 7/24/07, tonywhite [EMAIL PROTECTED] wrote: I'm new to jQuery and can't figure this one out. Instead of using an ajax get and innerHTML to load in external html, I can just use jQuery's load function: $(emptyDiv).load(externalHTMLFile); which I like! I would like to do is make better use of the graceful animations that jQuery has. I would prefer that the external HTML not show up so suddenly, but instead to slide or fade in place. It's not clear to me how to make that happen. I tried chaining, but by the time the content is loaded, the chained animation doesn't really do the trick: $emptyDiv).load(externalHTMLFile, function() {$emptyDiv.slideDown('slow');}); If you know of answer, please share. Thanks for any help. Tony -- Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com