Thanks for the reply, Karl. I ran this code:
$(document).ready(function() { $(‘#add-section’).livequery(‘click’, function() { $.scrollTo(‘div.section:last’, 1000); if ( $('div.section:last').length > 0 ) { alert('yes'); } else { alert('no'); }; }); }); I get a 'yes' alert every time. Just can't figure out why this isn't working. There are no div's with the class of 'section' near the top of the page at all... Thoughts? Rick -----Original Message----- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Karl Rudd Sent: Tuesday, February 24, 2009 9:49 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Is this a valid selector? Apologies for the last post, I clicked send before I was ready. Check to see that the 'div.section:last' selector actually returns a valid jQuery object. (So check that $('div.section:last').length > 0) Karl Rudd On Wed, Feb 25, 2009 at 1:40 PM, Rick Faircloth <r...@whitestonemedia.com> wrote: > (‘div.section:last’) ??? > > > > I’m trying to use it in this code: > > > > $(document).ready(function() { > > > > $(‘#add-section’).livequery(‘click’, function() { > > $.scrollTo(‘div.section:last’, 1000); > > }); > > > > }); > > > > FF3 does nothing with it…IE7 scrolls close to the top > > of the page, rather than to towards the bottom > > where the ‘last div with class=section’ has been created. > > > > Ideas on how to make this work, anyone? > > > > Thanks, > > > > Rick