I was trying to imitate a Lynda.com example on appending elements using jQuery. This involved appending an additional element but I couldn't get it working. I ended up just breaking things down to its bare minimum and I still can't get it working.
<h1>Here are my paragraphs</h1>
<p>This is the first paragraph</p>
<p>This is the second paragraph</p>
<form>
<input value="(enter text here)"></input>
</form>
The jQuery code I have is:
$(document).ready(function(){
'use strict';
var $group = $("input");
$group.append("<br><p>TEST TEST TEST</p>");
});
Obviously, as I'm here, this doesn't work - even though it's pretty much exactly as written in the lesson. Interestingly, if I replace "input" with "p", "h1" or even "form" then the "TEST TEST TEST" appends to those elements as expected.
I tried to search online for similar issues but have been unsuccessful. If someone could explain what I'm not understanding here I would be very, very grateful.
/like<input type="text" value="(enter text here)" />