vladkrasovsky
4/9/2016 - 7:33 PM

jQuery creating of new element

jQuery creating of new element

$("<div/>", {
  "class": "clickme",
  text: "Нажми на меня!",
  click: function(){
      $(this).html('Спасибо.');
  }
}).appendTo("body");