ligiaff
8/22/2017 - 4:53 PM

Creating a bottom fixed Chat Button

Creating a bottom fixed Chat Button

  $(".qwp-chat-bubble").click(function () {
    $('.qwp-chat-bubble__box').addClass('popup-box-on');
  });
            
  $(".qwp-chat-bubble__box .panel-header").click(function () {
    $('.qwp-chat-bubble__box').removeClass('popup-box-on');
  });
<div class="qwp-chat-bubble">
		<i class="fa fa-envelope" aria-hidden="true"></i> Atendimento online
	</div>

	<div class="qwp-chat-bubble__box">
		<div class="panel-header">
			<div class="panel-header__title">
				<i class="fa fa-envelope" aria-hidden="true"></i> Atendimento online
			</div>
			<i class="fa fa-caret-down" aria-hidden="true"></i>
		</div>
		<div class="panel-body">
			<h4>Sobre qual assunto você deseja falar?</h4>
			<a class="qwp-chat-bubble__btn" target="_blank" href="#">Contato</a>
			<div class="panel-footer">
				<p>Horário de funcionamento de segunda a sexta de 10:00 às 17:00</p>
			</div>
		</div>
	</div>
.qwp-chat-bubble {
	width: 230px;
  height: 45px;
  background-color: #F6980F;
  display: block;
  border: 0;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  margin: 0;
  padding: 10px 15px;
  cursor: pointer;
  color: #001236;
  font-size: 15px;
  -webkit-box-shadow: 2px 0 15px 0 rgba(0,0,0,.3);
  -moz-box-shadow: 2px 0 15px 0 rgba(0,0,0,.3);
  box-shadow: 2px 0 15px 0 rgba(0,0,0,.3);
}

.qwp-chat-bubble i {
  color: #001236;
  margin-right: 5px;
}

.popup-box-on {
	display: block !important;
}

.qwp-chat-bubble__box {
	background-color: #F6980F;
  margin: 0;
  padding: 0;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  width: 280px;
  height: 385px;
  color: #001236;
  display: none;
  -webkit-box-shadow: 2px 0 15px 0 rgba(0,0,0,.3);
  -moz-box-shadow: 2px 0 15px 0 rgba(0,0,0,.3);
  box-shadow: 2px 0 15px 0 rgba(0,0,0,.3);
}

.panel-header {
  width: 100%;
  height: 45px;
  line-height: 45px;
  padding: 0 15px;
  color: #001236;
  background-color: #F6980F;
  border: 1px solid #F6980F;
  cursor: pointer;
  font-size: 15px;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -ms-flex-align: center;
  -ms-grid-row-align: center;
  align-items: center;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}

.panel-header i {
  color: @color-0;
  margin-right: 5px;
}

.panel-body {
  height: 100%;
  color: #5a5a5a;
  background-color: #fff;
  padding: 15px 30px;
  border: 1px solid #c4c4c4;
  border-top: 0;
  text-align: center;
}
.panel-body h4 {
  margin-bottom: 15px;
  font-size: 16px;
}

.panel-footer {
  height: auto;
  border-top: 1px solid #bbb;
  color: #5a5a5a;
  background-color: #fff;
  padding: 0;
  text-align: center; 
}

.panel-footer p {
  margin-top: 10px;
  font-size: 13px;
  line-height: 16px;
}

.qwp-chat-bubble__btn {
	box-shadow: none;
  border-radius: 0;
  padding: 12px 24px;
  color: #fff;
  background-color: #001236;
  border: 0;
  transition: all .2s ease-in-out;
  display: block;
  font-size: 15px;
  margin-bottom: 15px;
  text-align: center;
}