') and $('p')-时光取名叫无心的回答
') and $('p')
Can someone explain to me the difference between $(\'\') and $(\'p\') in jQuery.
$(\'\')
\')
$(\'p\')
for example, if i write:
$(\'body\').
$('') creates a new paragraph () element. ()
$('')
')
$('p') selects all existing paragraph elements.
$('p')
For example:
$('p').after($('').html('foo'))
').html('foo'))
Will select all paragraphs and add new paragraphs after them.