Is there an easy way to implement the up method for manipulating the DOM without jQuery in my AngularJS directive?
JQuery method:
$element.before($insertedBeforeElement);
To do this without jQuery, but with angular jqLite:
$element.parent()[0].insertBefore($insertedBeforeElement[0], $element[0]);
jqLite supports .after(), so you can use this to shuffle a little.
.after()
$element.after($insertedBeforeElement); //add it after $insertedBeforeElement.after($element); //now switch the positions
Source: https://habr.com/ru/post/1527014/More articles:Why is Ajax.BeginForm redirected to a new blank page after submission? - c #Using multiple lines without a number - iosHow to check if the site allowed Javascript to be entered in your bookmarklet? - javascriptSpring Start throws an exception - javaHow to get Emacs to use tabs instead of spaces? - indentationBinding when a property is not observed - c #Как перетащить файл ви отправить его в поле файла? - javascriptSignalR - How can I call the Hub method on the server from the server - c #High memory usage due to autocomplete log - ruby-on-railsRegression using PYMC3 - pythonAll Articles