[jQuery] Re: Jquery remove dd problem

2009-01-30 Thread NicholasPufal


Yes. That was the problem.

After I did post it here, I did realize the dumb mistake I've done :ninja:

Thanks a lot for the reply!



amuhlou wrote:
> 
> 
> It looks like $("#list_sucesso dt dd").remove();  is the problem.  The
> way you've written the selector, it would look inside the  for the
>  to remove.
> 
> $("#list_successo dl dd").remove(); should get the one you're after.
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Jquery-remove-dd-problem-tp21747270s27240p21749870.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Jquery remove dd problem

2009-01-30 Thread NicholasPufal


Hi,

I'm currently using the plugin jQueryForm.

With it I want to retrieve some info from the Ajax request. In order to do
that, each time the user submit the form, I need to clean the information
retrieved previously.

In my XHTML code I have some div in charge of those messages, which is this:


Sucesso!   

As seguintes operações foram realizadas:



In the JS part, I did set this:

$(document).ready(function() {

$("#form").ajaxForm(function(data){

$("#list_sucesso dt dd").remove();
$("#ok").fadeIn();  
$("#list_sucesso dt").after(""+ data + "");


});

}); 

The problem is that the line $("#list_sucesso dt dd").remove(); isn't
removing the dd tags. I tried to use empty() as well, and still didn't work.
Tried with html(""), and didn't happen as expected. It's always just adding
a DD tag after the one that was created on the previously submission.

Any ideas?

I appreciate any advice.

Nicholas
-- 
View this message in context: 
http://www.nabble.com/Jquery-remove-dd-problem-tp21747270s27240p21747270.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.