Imagine you have 2 buttons
The first button
<button class="arguments variation-one">Some text</button>
- this button has dynamic classes like: variation-one, variation-two, variation-three, but the .arguments class remains static.
and the second button
<button class="simple">Other text</button>
I need to hide the second button if the first button receives the class .variation-two, without any click events. Whether through js, jQuery, or even css if it is possible. Can someone assist me with this?
I came across a similar problem on this forum and found this solution:
$(document).ready(function() {
var $redTags = $('.lt-label');
if($redTags.hasClass(".lt-offline") {
$("#l-b-wrapper").hide();
}
}
I attempted to adapt it to my task, but unfortunately, nothing seems to be working for me