I want to change the text of a h2. If I use alert, it shows undefined with .html and .val, so, wouldn't it be something like this?:
$("#h2Id").text("new text");
It doesn't work, though. Thanks in advance.
edit: the html is plain simple, as I'm trying to understand why it doesn't work.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="jquery.js"></script>
<link href="css/estilos.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="testingStuff.js"></script>
</head>
<body>
<h2 id="question"> ASD </h2>
</body>