使用其他业务ID时,信任试点轮播无法正常工作

时间:2018-06-29 13:49:37

标签: javascript jquery html css trustpilot

在代码笔上有一些需要更改的代码,我正尝试放置其他业务ID

codepen:https://codepen.io/edcastano/pen/AXYJEY

$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(2)").removeAttr("src").removeAttr("srcdoc");
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(2)").css({"display":"none", "visibility":""});
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(1)").removeAttr("src").removeAttr("srcdoc");
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(1)").css({"display":"none", "visibility":""});
$("#optimizely_764986252 iframe").css({"left":-213, "top":977, "width":1821, "height":296});
$("#wrap").css({"position":"relative", "left":0, "top":0});
$("#wrap").css({});
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(2)").removeAttr("src").removeAttr("srcdoc");
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(2)").css({"display":"none", "visibility":""});
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(1)").removeAttr("src").removeAttr("srcdoc");
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(1)").css({"display":"none", "visibility":""});
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(0)").removeAttr("src").removeAttr("srcdoc");
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(0)").css({"display":"none", "visibility":""});


$("#main_bg").append("<div id=\"optimizely_604049823\">...</div>");
$("#optimizely_604049823").replaceWith("<div id=\"optimizely_604049823\"><!-- TrustBox widget -->\n<div class=\"trustpilot-widget\" data-locale=\"en-US\" data-template-id=\"53aa8912dec7e10d38f59f36\" data-businessunit-id=\"58a3003b0000ff00059cab80\" data-style-height=\"130px\" data-style-width=\"100%\" data-theme=\"light\" data-stars=\"4,5\">\n  <a href=\"https://www.trustpilot.com/review/eliquidsnow.co.uk" target=\"_blank\">Trustpilot</a>\n</div>\n<!-- End TrustBox widget --></div>");
$(".trustpilot-widget > a").css({"display":"none", "visibility":""});
$(".trustpilot-widget").replaceWith("<div class=\"trustpilot-widget\" data-locale=\"en-US\" data-template-id=\"53aa8912dec7e10d38f59f36\" data-businessunit-id=\"58a3003b0000ff00059cab80\" data-style-height=\"130px\" data-style-width=\"100%\" data-theme=\"light\" data-stars=\"4,5\" style=\"position: relative;\">\n  <a href=\"https://www.trustpilot.com/review/eliquidsnow.co.uk" target=\"_blank\" style=\"display: none;\">Trustpilot</a>\n<iframe frameborder=\"0\" scrolling=\"no\" src=\"https://www.trustpilot.com/review/eliquidsnow.co.uk" style=\"position: relative; height: 130px; width: 100%; border-style: none; display: block; overflow: hidden;\"></iframe></div>");
$(".trustpilot-widget > iframe:eq(1)").removeAttr("src").removeAttr("srcdoc");
$(".trustpilot-widget > iframe:eq(1)").css({"display":"none", "visibility":""});
$(".trustpilot-widget > iframe:eq(1)").removeAttr("src").removeAttr("srcdoc");
$(".trustpilot-widget > iframe:eq(1)").css({"display":"none", "visibility":""});
$("#optimizely_604049823").css({"background-color":"#ffffff"});
$(".trustpilot-widget > iframe:eq(1)").removeAttr("src").removeAttr("srcdoc");
$(".trustpilot-widget > iframe:eq(1)").css({"display":"none", "visibility":""});
$("#optimizely_604049823").css({"border-spacing":"49px 90px"});
$("#optimizely_604049823").css({"border-spacing":"", "height":"130px", "margin":"0px", "padding":"90px", "clear":"both", "position":"relative", "float":"none"});
$("#optimizely_604049823").css({"display":"none", "visibility":""});
$("#wrap").append("<div id=\"optimizely_764986252\">...</div>");
$("#optimizely_764986252").replaceWith("<div id=\"optimizely_764986252\"><!-- TrustBox widget -->\n<div class=\"trustpilot-widget\" data-locale=\"en-US\" data-template-id=\"53aa8912dec7e10d38f59f36\" data-businessunit-id=\"58a3003b0000ff00059cab80\" data-style-height=\"130px\" data-style-width=\"100%\" data-theme=\"light\" data-stars=\"4,5\">\n  <a href=\"https://www.trustpilot.com/review/eliquidsnow.co.uk" target=\"_blank\">Trustpilot</a>\n</div>\n<!-- End TrustBox widget --></div>");
$("#optimizely_764986252 a").css({"display":"none", "visibility":""});
$("#optimizely_764986252 > .trustpilot-widget").css({"background-color":"#ffffff"});
$("#optimizely_764986252 > .trustpilot-widget").css({"padding":"0px", "margin":"50px", "height":"131px"});
$("#optimizely_764986252 iframe").css({"z-index":3172000});
$("#optimizely_764986252 > .trustpilot-widget").css({"display":"none", "visibility":""});
$("#main_bg").append("<div id=\"optimizely_282050013\">...</div>");
$("#optimizely_282050013").replaceWith("<div id=\"optimizely_282050013\"><!-- TrustBox widget -->\n<div class=\"trustpilot-widget\" data-locale=\"en-US\" data-template-id=\"53aa8912dec7e10d38f59f36\" data-businessunit-id=\"58a3003b0000ff00059cab80\" data-style-height=\"130px\" data-style-width=\"100%\" data-theme=\"light\" data-stars=\"4,5\">\n  <a href=\"https://www.trustpilot.com/review/eliquidsnow.co.uk" target=\"_blank\">Trustpilot</a>\n</div>\n<!-- End TrustBox widget --></div>");
$("#optimizely_282050013").css({"background-color":"#ffffff", "margin":"50px", "height":"130px"});
$("#optimizely_282050013 a").css({"display":"none", "visibility":""});
$("#optimizely_282050013 > .trustpilot-widget").css({"width":"100%"});
$("#optimizely_282050013 > .trustpilot-widget").css({"width":"100%", "margin":"50px", "text-align":"", "position":""});
$("#optimizely_282050013 > .trustpilot-widget").css({"margin":"0px"});
$("#optimizely_282050013").css({"width":"100%", "margin":"0px", "padding":"50px", "height":"230px", "position":"", "float":""});
$("#optimizely_282050013").css({"height":"15em", "width":"100%", "padding":"3em"});
$("#optimizely_282050013").css({"padding":"28px", "width":"100%", "height":"183px"});
$(".row").css({"margin":"", "padding":"", "height":"800px"});
$("#main_bg > .container").css({"height":"800px"});
$(".col").css({"height":"700px"});
$(".row").css({"height":"755px"});
$("#main_bg > .container").css({"height":"775px"});


<script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.sync.bootstrap.min.js" async></script>


<div class="trustpilot-widget" data-locale="en-US" data-template-id="53aa8912dec7e10d38f59f36" data-businessunit-id="53da56ff0000640005792dae" data-style-height="130px" data-style-width="100%" data-theme="light" data-stars="4,5">
  <a href="https://www.trustpilot.com/review/eliquidsnow.co.uk" target="_blank">Trustpilot</a>
</div>

这一个 58a3003b0000ff00059cab80

$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(2)").removeAttr("src").removeAttr("srcdoc");
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(2)").css({"display":"none", "visibility":""});
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(1)").removeAttr("src").removeAttr("srcdoc");
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(1)").css({"display":"none", "visibility":""});
$("#optimizely_764986252 iframe").css({"left":-213, "top":977, "width":1821, "height":296});
$("#wrap").css({"position":"relative", "left":0, "top":0});
$("#wrap").css({});
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(2)").removeAttr("src").removeAttr("srcdoc");
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(2)").css({"display":"none", "visibility":""});
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(1)").removeAttr("src").removeAttr("srcdoc");
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(1)").css({"display":"none", "visibility":""});
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(0)").removeAttr("src").removeAttr("srcdoc");
$("#optimizely_764986252 > .trustpilot-widget > iframe:eq(0)").css({"display":"none", "visibility":""});


$("#main_bg").append("<div id=\"optimizely_604049823\">...</div>");
$("#optimizely_604049823").replaceWith("<div id=\"optimizely_604049823\"><!-- TrustBox widget -->\n<div class=\"trustpilot-widget\" data-locale=\"en-US\" data-template-id=\"53aa8912dec7e10d38f59f36\" data-businessunit-id=\"58a3003b0000ff00059cab80\" data-style-height=\"130px\" data-style-width=\"100%\" data-theme=\"light\" data-stars=\"4,5\">\n  <a href=\"https://www.trustpilot.com/review/eliquidsnow.co.uk" target=\"_blank\">Trustpilot</a>\n</div>\n<!-- End TrustBox widget --></div>");
$(".trustpilot-widget > a").css({"display":"none", "visibility":""});
$(".trustpilot-widget").replaceWith("<div class=\"trustpilot-widget\" data-locale=\"en-US\" data-template-id=\"53aa8912dec7e10d38f59f36\" data-businessunit-id=\"58a3003b0000ff00059cab80\" data-style-height=\"130px\" data-style-width=\"100%\" data-theme=\"light\" data-stars=\"4,5\" style=\"position: relative;\">\n  <a href=\"https://www.trustpilot.com/review/eliquidsnow.co.uk" target=\"_blank\" style=\"display: none;\">Trustpilot</a>\n<iframe frameborder=\"0\" scrolling=\"no\" src=\"https://www.trustpilot.com/review/eliquidsnow.co.uk" style=\"position: relative; height: 130px; width: 100%; border-style: none; display: block; overflow: hidden;\"></iframe></div>");
$(".trustpilot-widget > iframe:eq(1)").removeAttr("src").removeAttr("srcdoc");
$(".trustpilot-widget > iframe:eq(1)").css({"display":"none", "visibility":""});
$(".trustpilot-widget > iframe:eq(1)").removeAttr("src").removeAttr("srcdoc");
$(".trustpilot-widget > iframe:eq(1)").css({"display":"none", "visibility":""});
$("#optimizely_604049823").css({"background-color":"#ffffff"});
$(".trustpilot-widget > iframe:eq(1)").removeAttr("src").removeAttr("srcdoc");
$(".trustpilot-widget > iframe:eq(1)").css({"display":"none", "visibility":""});
$("#optimizely_604049823").css({"border-spacing":"49px 90px"});
$("#optimizely_604049823").css({"border-spacing":"", "height":"130px", "margin":"0px", "padding":"90px", "clear":"both", "position":"relative", "float":"none"});
$("#optimizely_604049823").css({"display":"none", "visibility":""});
$("#wrap").append("<div id=\"optimizely_764986252\">...</div>");
$("#optimizely_764986252").replaceWith("<div id=\"optimizely_764986252\"><!-- TrustBox widget -->\n<div class=\"trustpilot-widget\" data-locale=\"en-US\" data-template-id=\"53aa8912dec7e10d38f59f36\" data-businessunit-id=\"58a3003b0000ff00059cab80\" data-style-height=\"130px\" data-style-width=\"100%\" data-theme=\"light\" data-stars=\"4,5\">\n  <a href=\"https://www.trustpilot.com/review/eliquidsnow.co.uk" target=\"_blank\">Trustpilot</a>\n</div>\n<!-- End TrustBox widget --></div>");
$("#optimizely_764986252 a").css({"display":"none", "visibility":""});
$("#optimizely_764986252 > .trustpilot-widget").css({"background-color":"#ffffff"});
$("#optimizely_764986252 > .trustpilot-widget").css({"padding":"0px", "margin":"50px", "height":"131px"});
$("#optimizely_764986252 iframe").css({"z-index":3172000});
$("#optimizely_764986252 > .trustpilot-widget").css({"display":"none", "visibility":""});
$("#main_bg").append("<div id=\"optimizely_282050013\">...</div>");
$("#optimizely_282050013").replaceWith("<div id=\"optimizely_282050013\"><!-- TrustBox widget -->\n<div class=\"trustpilot-widget\" data-locale=\"en-US\" data-template-id=\"53aa8912dec7e10d38f59f36\" data-businessunit-id=\"58a3003b0000ff00059cab80\" data-style-height=\"130px\" data-style-width=\"100%\" data-theme=\"light\" data-stars=\"4,5\">\n  <a href=\"https://www.trustpilot.com/review/eliquidsnow.co.uk" target=\"_blank\">Trustpilot</a>\n</div>\n<!-- End TrustBox widget --></div>");
$("#optimizely_282050013").css({"background-color":"#ffffff", "margin":"50px", "height":"130px"});
$("#optimizely_282050013 a").css({"display":"none", "visibility":""});
$("#optimizely_282050013 > .trustpilot-widget").css({"width":"100%"});
$("#optimizely_282050013 > .trustpilot-widget").css({"width":"100%", "margin":"50px", "text-align":"", "position":""});
$("#optimizely_282050013 > .trustpilot-widget").css({"margin":"0px"});
$("#optimizely_282050013").css({"width":"100%", "margin":"0px", "padding":"50px", "height":"230px", "position":"", "float":""});
$("#optimizely_282050013").css({"height":"15em", "width":"100%", "padding":"3em"});
$("#optimizely_282050013").css({"padding":"28px", "width":"100%", "height":"183px"});
$(".row").css({"margin":"", "padding":"", "height":"800px"});
$("#main_bg > .container").css({"height":"800px"});
$(".col").css({"height":"700px"});
$(".row").css({"height":"755px"});
$("#main_bg > .container").css({"height":"775px"});


<script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.sync.bootstrap.min.js" async></script>


<div class="trustpilot-widget" data-locale="en-US" data-template-id="53aa8912dec7e10d38f59f36" data-businessunit-id="53da56ff0000640005792dae" data-style-height="130px" data-style-width="100%" data-theme="light" data-stars="4,5">
  <a href="https://www.trustpilot.com/review/eliquidsnow.co.uk" target="_blank">Trustpilot</a>
</div>

目前我有这个

53da56ff0000640005792dae

我似乎无法找出问题所在。我对JavaScript很陌生。我尝试使用开发人员工具,但无法看到问题

1 个答案:

答案 0 :(得分:0)

尽管我目前无法验证,但该行为表明该业务部门不在TrustboxCarousel的正确层中。

其他TrustBox(小工具)可用于较低级别,因此有可能找到另一个适合您需求的工具。

应该可以在https://businessapp.b2b.trustpilot.com/#/integrations/trustbox/library上查看您有权访问的内容(假设您拥有所询问的业务部门)