My buttons have a design like this:
<a class="h-modal-btn branch-modal-btn"> Buy Now </a>
The issue arises when I need to remove certain classes and add attributes to these buttons based on the query string in the URL. Skipping ahead, I simply used the following code:
$('a.branch-modal-btn').removeClass('h-modal-btn');
After verifying that the class was successfully removed using the developer tools, I realized that the following code still executed:
$('.h-modal-btn').on('click', function() {
// Do something
)}
This situation is quite frustrating! Any assistance would be highly appreciated.