[jQuery] Re: how to remove elements by attribute

2009-10-27 Thread brian

$('div[foo]').remove();

On Tue, Oct 27, 2009 at 1:04 PM, jason jason.novo...@gmail.com wrote:

 Hi,

 How can I remove all div foo=whatver...  div elements using the
 attribute foo for my selector? Basically any div with a foo attribute
 I want gone.

 Thanks, Jason



[jQuery] Re: how to remove elements by attribute

2009-10-27 Thread Karl Swedberg


On Oct 27, 2009, at 1:04 PM, jason wrote:



Hi,

How can I remove all div foo=whatver...  div elements using the
attribute foo for my selector? Basically any div with a foo attribute
I want gone.

Thanks, Jason




You could try this:

$('div[foo]').remove();


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com