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.
Just remove the space between the selector.
$(".wishlist-icon[data-wish-name='product'][data-wish-url='/product']").hide();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.