Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
// Chain: modify children then operate on parent $('#notice') .find('strong') .css('color', 'red') .end() // back to #notice .fadeIn(400); // Filter two subsets, style each, return to full set $('li') .filter('.done') .css('text-decoration', 'line-through') .end() .filter('.urgent') .css('font-weight', 'bold'); // addBack — include the original element with descendants $('#sidebar') .find('p') .addBack() // #sidebar + all p inside it .css('font-family', 'Georgia, serif');
Result
Open