For JavaScript functions that add HTML content, these added content is not being displayed in the source code of the page, even though it's working.
Example:
<html>
<head>
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script></head><body></body><script>$("body").append("<p>Apareço no carregamento normal, mas não no código fonte </p>");
</script>
</html>
I have a jQuery plugin for table, but it can not select the table because it does not have the columns yet and since I create the columns dynamically, I just can not use the plugin.
- EDIT-- My problem was in the asynchronous function of ajax. I had a function to activate the plugin, and before the function with ajax, since the function of ajax still did not return a value, I could not activate the plugin because the object did not exist yet. The solution was to put the plugin activation in ajax success