When changing the content with .html()
there is an issue not showing the whole data:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
$("#btn2").click(function() {
$("#test2").html("<b>Hello < world!</b>");
});
</script>
</head>
<body>
<p id="test2">Result here</p>
<button id="btn2">Click for result</button>
</body>
</html>
The result I get is: Hello
I need the result to be: Hello < world!
This is just a sample.