Posts by Matheus Grieger • 71 points
1 post
-
7
votes2
answers10723
viewsA: Good practices when creating elements with jQuery
You can also use as follows: $('<div>', { id: 'minhaDiv', class: 'minhaClasse', 'outro-atributo': 'meuValor' }).appendTo('body'); I always use it like this, it works perfectly!…
jqueryanswered Matheus Grieger 71