I have this button with multiple data attributes, and i want to hide it by selecting it based on class and two data attributes.
<a href='#' class='wishlist-icon' data-wish-name='product' data-wish-url='/product'>Button</a>
$(".wishlist-icon [data-wish-name='product'] [data-wish-url='/product']").hide();
I don't know why this selector doesn't work.
[data-wish-url='/product']inside an element[data-wish-name='product']inside an element.wishlist-icon. If you want to select an element based on multiple selectors, you have to write them together.