Hi all,

I'm a newbie in jQuery. I have some question on how 'not()' works. e.g.

HTML:
<table id="test">
        <tr>
                <td>
                        <input type="checkbox" name="checkbox"/>
                        <input type="hidden" name="hidden"/>
                </td>
                <td>
                        <input type="text" name="text"/>
                </td>
                <td>
                        <select name="select" name="select">
                                <option value="0">0</option>
                        </select>
                </td>
                <td>
                        <textarea rows="3" cols="11" name="textarea"></textarea>
                </td>
        </tr>
</table>


JS:
$(document).ready(function(){
        $("#test")
                .find("tr").find("input,select,textarea")
                .not("[EMAIL PROTECTED]@name=checkbox]")
                .each(function(){
                        alert(this.name);
                });
});

What I thought was that it should find all the input,select,textara in
<tr> ,remove all checkbox elements and alert their names. So I'm
expecting 'hidden','text','select' and 'textarea' would be alerted.

But in reality, it will only alert 'select' and 'textarea'. Why is that??

-- 
Best Regards,
Jacky
http://jacky.seezone.net

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to