Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- var __isp_options = {
- isp_serp_callback: function() {
- $jquery_isp('.isp_grid_product').each(function(index) {
- //Rule 1: (Hide All prices from any search result page)
- $jquery_isp(this).find('.isp_product_price_wrapper span').text("");
- //Rule 2: (Add "Request Price" button to vortex brand)
- var title = $jquery_isp(this).find('.isp_product_title').text();
- if (title.includes("vortex") || title.includes("Vortex")) {
- $jquery_isp(this).find('.isp_product_title').after(" ")
- $jquery_isp(this).find('.isp_product_price_wrapper').replaceWith
- ('<button id="requestPriceBtn" type="button" class="btn" style=" border-radius: 5%; margin: auto; display:block">Request Price</button>');
- $jquery_isp(this).find('.btn').click(function(){
- //***reqest sent to site***//
- $(this).replaceWith('<div id= "requestSent " style= "color: green; ">Price request sent! A customer service agent will email you shortly.</div>');
- });
- }
- });
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement