Truppe Steven wrote:
>
> Can someone tell me why this does not work ? I'm trying to remove the
> submit button from a form (.selectsubmit = <select class='selectsubmit'>)
>
I guess you meant <form class='selectsubmit'> instead? Normally a select
woudn't have a nested input.
> $(document).ready(function(){
> $(".selectsubmit").each(function(){
> $("[EMAIL PROTECTED]", $(this)).remove();
> });
> });
>
I think the each is selecting each element in the form. that makes the
"this" context the input you are looking for, but then the next selector
tries to look for an input inside that input. You don't need the each
anyway, just use the power of selectors:
$(".selectsubmit [EMAIL PROTECTED]").remove();
If there is only one selectSubmit form, use an id rather than a class
because it's faster.
--
View this message in context:
http://www.nabble.com/again-on-question-on-selectors-tf2510755.html#a7002439
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/