Generating valid XHTML when using jQuery.append ()

In the examples here: they show that straight HTML is used as an argument:



But the validator in W3 would object to this like this:

Line 96, column 76: document type does not allow element "p" here
…ata).append("<p class='pag


How do I do this in order to get valid XHTML?

EDIT - here's an example of what PHP wrote:

$('#citations_18401-01').html(data).append("<p class='paginated_link'><b>Result Pages:</b>&nbsp;<b class='paginated_link'>1</b>&nbsp;<a class='paginated_link' href='property_info.php?lot=18401-01&quote_set=1&limit=30&tab=3'>2</a>&nbsp;</p><p>&nbsp;</p>"); 



source to share

1 answer

You have to wrap your inline jQuery with XHTML specific tags. See this article .



All Articles