javascript - Using a function parameter inside :not() -
my overall goal select elements in document excluding elements in specified class. here's code far:
var x = document.queryselectorall(":not(.myparameter)");
i want myparameter passed function select every element not in ".cars" class instance or whatever user defines myparameter. think i'm close, might have quotes wrong. ideas? help appreciated!
have tried this?
var x = document.queryselectorall(":not(" + myparameter + ")");
javascript html
No comments:
Post a Comment