Before and After help whats wrong with my code



SyntaxError: Unexpected token '<'

Replace this line with your code.


isn't working either


I'm not sure what parameter to pass to .after, but you are passing a string, 'hello' and also passing /p>, which seems to be an incomplete closing paragraph tag. Please add description and I can help you further.


Text nodes do not get quotes in HTML, but jQuery selectors are quoted when then are plain text strings.


This will create a paragraph element in the DOM which may be selected in the statement that follows.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.