Sh.Dehnavi
Sh.Dehnavi

Reputation: 65

why does the link is not clickable when Jquery toggle() and show that?

I would to make a live chat button for my website. When a user clicks on that my contacts will be shown to him by JQuery. Everything is working, but I don't know why the a link is not clickable when it is shown. You can see the live chat button on this website. The a link belongs to red box

jQuery(document).ready(function($) {
  $("div.livechaticon").click(function() {
    $(".onchatpart").toggle(400);
  });
});
.livechaticon {
  position: absolute;
  bottom: 30px;
  right: 14px;
  background: red;
  padding: 10px;
  border-radius: 100%;
  position: fixed;
  -moz-box-shadow: 0px 0px 8px #505050;
  -o-box-shadow: 0px 0px 8px #505050;
  -ms-box-shadow: 0px 0px 8px #505050;
  box-shadow: 0px 0px 8px #505050;
  z-index: 1000;
  cursor: pointer;
}

.livechaticon img {
  width: 40px;
}

.livechaticon .tooltip_form {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 100%;
  margin-bottom: 15px;
  z-index: 1;
  border-radius: 4px;
  -webkit-box-shadow: 0 3px 20px rgba(106, 102, 112, .15);
  box-shadow: 0 3px 20px rgba(106, 102, 112, .15);
  pointer-events: none;
  color: #a3a2a5;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  background: red;
  color: white;
}

.livechaticon .tooltip_form:before {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 21px;
  width: 12px;
  height: 12px;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  border-radius: 0 0 4px 0;
  background-color: inherit;
  -webkit-box-shadow: 12px 12px 15px rgba(106, 102, 112, .15);
  box-shadow: 12px 12px 15px rgba(106, 102, 112, .15);
}

.livechaticon .tooltip_tele {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 116px;
  margin-bottom: 15px;
  z-index: 1;
  background-color: #fff;
  border-radius: 4px;
  -webkit-box-shadow: 0 3px 20px rgba(106, 102, 112, .15);
  box-shadow: 0 3px 20px rgba(106, 102, 112, .15);
  pointer-events: none;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  background: #179cde;
  color: white;
}

.livechaticon .tooltip_what {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 166px;
  margin-bottom: 15px;
  z-index: 1;
  border-radius: 4px;
  -webkit-box-shadow: 0 3px 20px rgba(106, 102, 112, .15);
  box-shadow: 0 3px 20px rgba(106, 102, 112, .15);
  pointer-events: none;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  background: #25D366;
  color: white;
  font-family: iransansdnnum;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="livechaticon">
  <img src="https://karneta.com/wp-content/themes/karneta/img/support.png" class="livechatimg img-responsive" alt="">
  <!--<i class="fas fa-comment-alt"></i>-->
  <a href="https://karneta.com/contactme/" class="tooltip_form onchatpart" style="display: inline-block;">فرم تماس با من</a>
  <p class="tooltip_tele onchatpart" style="display: block;/* background: red; */">پشتیبانی تلگرام: shdehnavi@</p>
  <p class="tooltip_what onchatpart" style="display: block;">پشتیبانی در واتسپ: 09350549490</p>
</div>

Upvotes: 0

Views: 55

Answers (1)

Niels Prins
Niels Prins

Reputation: 595

You should remove this:

pointer-events: none;

Upvotes: 1

Related Questions