How to check if an element exist , and if it does i want the insertAfter to be not valid.And if the element isn’t exist, then i want the insertAfter to be valib but only once.My goal is to send only once insertAfter if an element isn’t existing and if it does not send anything
Share
Just do a length check. Assuming you have a selector
#sel, and you want to insert something after it.