Javascript:
var header = $("#inputHeader").val();
function coolInput() {
if (header === "") {
$("#displayHeader").text("Type Something!");
}
else if(header !== "") {
$("#inputHeader").keyup(function () {
var value = $(this).val();
$("#displayHeader").text(value);
}).keyup();
}
}
setInterval(coolInput, 1);
HTML:
<blockquote>
<p id="displayHeader">jQuery no worky.</p>
<small><?php echo $_SESSION['user']; ?></small>
</blockquote>
My jQuery does work because the paragraph gets changed to "Type Something!", but when I enter something in the textbox the value does not change.