-1
For example: I want to give one .fadeOut()
throughout body
, but with the exception of some element, such as a div. Can this be done? How?
-1
For example: I want to give one .fadeOut()
throughout body
, but with the exception of some element, such as a div. Can this be done? How?
7
With jQuery you can use the function not()
. It allows you to select a larger group of objects and remove from them the ones you don’t want.
For example:
// seleciona todas as divs exceto as que tem a classe classe1
$('div').not('.classe1')
// seleciona todas as `<option>` exceto as selecionadas
$('option').not(':selected')
Browser other questions tagged javascript jquery
You are not signed in. Login or sign up in order to post.
Thank you, Ricardo!
– Seu Madruga
Thanks bro, I didn’t know that!!
– Sampaio Leal