I am trying to visualize edges of a graph with different widths by selecting edges based on their id fields. Is it possible to use variables in selector queries? How can I achieve this behaviour? There are ways to work around this by repeating code, for example: I would however prefer a cleaner solution, preferably by using a variable instead
Tag: selector
Javascript get element index position in DOM array by class or id
My situation Now I want to return the array item key – position of the element in the array – ( for example domElements[34]) searching in the array for the element with id=”asd”. How can I achieve this? What if instead of ID I want to search trough class=”asd hey” ? Any help appreciated, thank you! NB: Not in jquery,