I’m debugging through a 3rd party JS library and I noticed this jQuery selector statement.
I’m used to simple $([element]) selectors, so this is throwing me off.
$('<a/>', {
id: 'specialId',
href: '#',
'class': 'button-next',
html: 'SomeText'
}).appendTo($('#specialDivId'));
It’s generating a DOM object.
This is similar to doing
You can then use that to .appendTo something else!