jquery - Trying to ad content after input-field with after() -


After the input field, I would like to add an asterisk:

input

class = "Required" & gt;

with:

  $ (document) .ready (function () {$ (". Required"). ("*");} );  

but it does not work ...

You can do this:

  (function ($) {$ (document) .ready (function () {$ ("required.") Later ("*");}); }) (JQuery);  

Check that you put your code inside a closure and insert jQuery for the $ shortcut. You can read more about this here:


Comments