I'm attempting to add a placeholder attribute to multiple input tags with unique classes in a form. The form is generated by a plugin so I can't add the attribute in manually. Unfortunately nothing I have tried has worked. Because each placeholder is different I'm address each one separately...
Here's the HTML
<input class="name-field" type="text" id="yourName_38_1" name="yourName" value="">
The jQuery I'm using
$(".name-field").attr("placeholder", "name");
When I look in the console I get the following which is referring to line the jQuery is on.
Uncaught TypeError: $ is not a function
My understanding of jQuery is very basic. Please help
Thank you in advance.
Dave