Created
January 2, 2023 09:46
-
-
Save elias1435/aff5b7324ade3eb53710a228cf28a61b to your computer and use it in GitHub Desktop.
How to check if the URL contains a given string?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
if (window.location.href.indexOf("checkout/?add-to-cart=1375&quantity=1") > -1) { | |
titleClass = document.querySelector(".find_class_to_add_new_class"); | |
titleClass.classList.add("display-none-info"); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment