JQuery - Can we capture both the p and div tags at a time in a single sentence using jquery?
views:
25answers:
2
+3
A:
......
$('p, div')..........
Just separate each item with a comman (,
).
Alternatively, you could use the add function:
$('p').add('div')..........
Sarfraz
2010-03-11 06:12:51
+1 I always used .add, never knew about the ,
Plynx
2010-03-11 06:22:16
@Plynx: Thanks .............
Sarfraz
2010-03-11 06:24:04