I'm trying to change a p
element inside a pop-up window generated by a plugin in WordPress.
I've done this before, with the simple:
jQuery(".class")replaceWith("new text");`
method, it isn't working here, maybe because it's a pop-up, I'm not sure.
This is the link to the site: http://www.bernibeancoffee.com/order-online/
once you click on any product, there is a pop-up to choose different options, the first title below the image says "Choose Price Option", thats the p
element I can't change. Thanks for your help.
CodePudding user response:
Since its a pop-up so you have to do :
jQuery(document).find("p.wfs-pricing-option-label").replaceWith("new text");
Or add this jQuery code in that pop-up HTML (file or code) itself:
<script>
jQuery("p.wfs-pricing-option-label").replaceWith("new text");
</script>
https://prnt.sc/oHyPLZY1AKY9 And https://prnt.sc/JPlQWeqs93xy
CodePudding user response:
I checked your website. If you are using food store plugin then better to use their hook to replace string. Food store plugin have documentation for plugins you can check with them. Reference url -:
http://food-store.wpscripts.in/knowledge-base/