how to use OR in jquery

Posted by user1493339 on Stack Overflow See other posts from Stack Overflow or by user1493339
Published on 2012-10-14T15:14:12Z Indexed on 2012/10/14 15:37 UTC
Read the original article Hit count: 143

Filed under:

1st i would like to thanks all who view this and special thanks for those who answer this.

today, i tested this out but it not working, so just want to know how should this code. multiple "OR" in one line

$("input[name='ABC']or[name='DEF']or[name='GHI']or[name='JKL']").click(function (){ 
    //do something
});

or even put else for it like...

$("input[name='ABC'][name='DEF'][name='GHI'][name='JKL']").click(function (){ 
    //do something
}else{
    //do something else
});

i know both code is invalid, so is that possible to code in that way? so far i code it all one by one, so my coding is very long.

© Stack Overflow or respective owner

Related posts about jQuery