Re: [jQuery] Re: simple jquery question

2010-01-05 Thread John Arrowwood
But if this code will get executed more than once (e.g. in response to user actions), make sure you prefix it with code to remove all of the existing options in the dropdown, otherwise it will be additive. On Mon, Jan 4, 2010 at 5:23 AM, Karl Swedberg wrote: > this solution could be simplified a

Re: [jQuery] Re: simple jquery question

2010-01-04 Thread Karl Swedberg
this solution could be simplified a bit: $('h3.example').each(function() { $('#deptFilter').append( ' + $(this).html() + '' ); }); --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 3, 2010, at 6:53 AM, Paul Hutson wrote: This will do what you want, f

[jQuery] Re: simple jquery question

2010-01-03 Thread Paul Hutson
This will do what you want, first I assigned the elements via a filter : elements = $('h3').filter('.example'); Then I scrolled around the items found and output them to a span for debugging. elements.each(function() { $('#Output').html($('#Output').html() + "" + $(this).html()); }); He