For example: I want to give .fadeOut()
in all body
, but with the exception of some element, such as a div. This can be done? How?
For example: I want to give .fadeOut()
in all body
, but with the exception of some element, such as a div. This can be done? How?
With jQuery you can use the not()
function. It allows you to select a larger group of objects and remove the ones you do not want from them.
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')