我如何删除链接而不破坏代码 [英] How do I remove the link with out break the code

查看:81
本文介绍了我如何删除链接而不破坏代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个倒计时代码,它工作正常,唯一的问题是它链接回到tickcounter网站.我想在不破坏代码的情况下删除该链接,但是这似乎是不可能的,只要我进行了任何更改,浏览器中就不会显示任何内容.我只能添加内联CSS,因为我只能访问magento cms.任何帮助将不胜感激!预先谢谢你:)

I have this count down code it works just fine, the only problem is it's linking back to tickcounter website. I want to remove that link without breaking the code but it seems impossible, as soon as I'm making any changes nothing shows up in the browser. I can only add inline CSS as I only have access to magento cms. Any help would be highly appreciated! Thank you in advance :)

(function(d, s, id) {
  var js, pjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s);
  js.id = id;
  js.src = "//www.tickcounter.com/static/js/loader.js";
  pjs.parentNode.insertBefore(js, pjs);
}(document, "script", "tickcounter-sdk"));

.tcw:after { content: ""; display: block; margin-top: 25%; }

<div class="tcw" data-id="Countdown-38455" style="position: relative; display: inline-block; margin: 0 auto; width: 100%">
<a href="//www.tickcounter.com/countdown/38455/flash-sale" title="FLASH SALE">FLASH SALE</a>
<a href="//www.tickcounter.com/" title="Countdown">Countdown</a>
</div>

推荐答案

是的,可以删除该链接并放入您的js. 请按照以下步骤操作.

Yes can remove that link and put your js. Follow below steps.

  1. 打开 http://www.tickcounter.com/static/js/loader. js ,然后将渲染js复制到您自己的js文件中.
  2. 按如下所示链接您的js文件.
  1. open http://www.tickcounter.com/static/js/loader.js and copy the render js to your own js file.
  2. link your js file as below.

js.src ="//www.yourwebsite.com/js/loader.js";

js.src = "//www.yourwebsite.com/js/loader.js";

这篇关于我如何删除链接而不破坏代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆