i try to do that div gonna do smt onclick but it not worky 🙁
var wrapper = $('#sperma'), container;
container = $('<div onclick="console.log("zakupiono sperme")"></div>');
wrapper.append(container);
container.append('<h1>swierza sperma z chuja duzego</h1>')
output
Uncaught SyntaxError: Unexpected end of input
i want to get
zakupiono sperme
help fast
>Solution :
SyntaxError: Unexpected end of input means that the script ended, while the parser expected that there was more. I believe your issue is that you are using " and ' without escaping the necessary characters.
Try this maybe:
container = $('<div onclick="console.log(\'zakupiono sperme\')"></div>');