jquery - add an element AFTER another? -


When I add an element inside an element it adds, I want to add an element after an element.

For example.

  & lt; Div class = "link" & gt; & Lt; Input class = "link" type = "article" value = "scrial link" /> & lt; Br / & gt; & Lt; / Div & gt;  

How do I add an element after 'input', but before 'br'?

  $ ("input"). After ("& lt; p & gt; Hello "); You also have:  
  $ (" 

Lt; / p & gt; ") .insertAfter (" Input ");

will work just fine.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -