I am trying to select a number of div elements of a certain class but not having certain data attributes. For example, I have 12 divs with data attributes from 1 to 12 and I want to select all of them except those with data attribute 1, 11 and 12. This is my (not working) code so far:
$('div.randomize_class [data-value!=1],[data-value!=11],[data-value!=12]');
The aim is to shuffle only the matched divs and eventually append the ones with attribute 1, 11 and 12 at the end. The shuffling function works nicely, it's only about selecting a subset of the select class.
So after shuffling, I want to select only those with data attributes 1, 11 and 12. I tried this:
$('.randomize_class [data-value=1],[data-value=11],[data-value=12]')
Would be glad for any help! Thank you very much.