To select multiple elements having different attributes, multiple selector can be used. We can mix the class selector, element selector, id selector in this selector separated by “,”
$(’p.class, #p1′)
This will let you select all paragraph (p) having class attribute set as ‘class’ and all html elements having id attribute as ‘p1′
No comments:
Post a Comment