Welcome to Stack Overflow. When asking a question in future, make sure to show some evidence (usually code) that you've attempted to answer your question before asking it here, as that'll usually help the answerer.
Your code could be translated by replacing the jQuery(selector)
syntax with getElementById()
, and insertAdjacentHtml()
instead of after:
document.getElementById('selector_id')
.insertAdjacentHTML('afterend', '<span class="arrow"></span>');
There's not really a suitable replacement for $(document).ready()
, just make sure to have your script tags at the end of your HTML before the closing </body>
tag.
Take a look at http://youmightnotneedjquery.com/ - it's a great resource for translating from jQuery to vanilla JS.