Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Josué Alvares

Como fechar uma div após timer esgotar?

Recommended Posts

Olá pessoal, tudo bem?

 

O script abaixo é um contador onde apresento um display de contagem regressiva dentro de uma div e assim que finalizado, ele redireciona para uma url qualquer. Mas ao invés de direcionar a uma url, como eu poderia fazer para fechar essa mesma div quando o timer esgotar?

 

Qualquer ajuda é bem vinda!

<script type="text/javascript">
var scarcitySamuraiData = {"page_id":"846","timer":{"2":{"deadline":10}},"now":"1","end_time_timer":{"deadline":10,"redirect_url":"http:\/\/empresaqualquer.com.br\/"}};
</script>

 

Compartilhar este post


Link para o post
Compartilhar em outros sites

Você está utilizando um plugin, correto? Qual seria?

 

Sem detalhes, fica difícil ajudar.

 

Olá Lucas, tudo bem?

 

Desculpe, não tenho certeza se é um plugin, eu vou postar aqui o link que acredito que saberá me dizer melhor.

 

http://descomplicaexcel.com.br/contador/Exemplo01.html

 

Os arquivos *.js podem ser acessados aqui:

http://descomplicaexcel.com.br/contador/Exemplo01_files/jquery.js

http://descomplicaexcel.com.br/contador/Exemplo01_files/timer.js

 

 

 

Compartilhar este post


Link para o post
Compartilhar em outros sites

Fala Josué Alvares Beleza?

 

Cara fiz a alteração no plugin do timer adicionando um atributo e alterando a função expire.

Com base nas variaveis setadas dentro da chave end_time_timer;

 

Está me devendo uma cerveja! rsrsrs

 

Segue os arquivos:

 

timer.js

// Generated by CoffeeScript 1.4.0

/*

LEGAL COPYRIGHT NOTICE

Copyright (c) Noble Samurai Pty Ltd, 2008-2013. All Rights Reserved.

This software is proprietary to and embodies the confidential technology of Noble Samurai Pty Ltd.
Possession, use, dissemination or copying of this software and media is authorised only pursuant
to a valid written license from Noble Samurai Pty Ltd. Questions or requests regarding permission may
be sent by email to legal@noblesamurai.com or by post to PO Box 477, Blackburn Victoria 3130, Australia.
*/


(function() {

  jQuery(function($) {
    var ScarcitySamuraiTimer, serverNow, timerData, timerId, _ref;
    serverNow = parseInt(scarcitySamuraiData.now);
    ScarcitySamuraiTimer = (function() {

      function ScarcitySamuraiTimer($timerWrapper, timerData) {
        var clientNow, _ref,
          _this = this;
        this.$timerWrapper = $timerWrapper;
        this.$days = $('.ss-days', this.$timerWrapper);
        this.$hours = $('.ss-hours', this.$timerWrapper);
        this.$minutes = $('.ss-minutes', this.$timerWrapper);
        this.$seconds = $('.ss-seconds', this.$timerWrapper);
        clientNow = this.getUnixTimestamp();
        this.serverTimeOffset = clientNow - serverNow;
        this.deadline = timerData.deadline;
        if (this.$timerWrapper.is('.ss-styled-timer')) {
          this.format = 'styled';
        } else {
          this.format = (_ref = timerData.format) != null ? _ref : 'text';
        }
        this.redirectURL = timerData.redirect_url;
        this.hideDiv = timerData.hide_div;
        this.value = this.updateTimer();
        this.intervalID = setInterval(function() {
          _this.value = _this.updateTimer();
          if (_this.value > 0) {
            return;
          }
          clearInterval(_this.intervalID);
          _this.onExpire();
        }, 1000);
      }

      ScarcitySamuraiTimer.prototype.getUnixTimestamp = function() {
        return Math.round((new Date()).getTime() / 1000);
      };

      ScarcitySamuraiTimer.prototype.pluralize = function(count, word) {
        return count + ' ' + word + (count === 1 ? '' : 's');
      };

      ScarcitySamuraiTimer.prototype.zeroPrefix = function(number) {
        if (number < 10) {
          return "0" + number;
        } else {
          return "" + number;
        }
      };

      ScarcitySamuraiTimer.prototype.updateTimer = function() {
        var days, hours, minutes, seconds, timerText, timerValue, value;
        timerValue = value = Math.max(this.deadline - this.getUnixTimestamp() + this.serverTimeOffset, 0);
        days = Math.floor(value / 86400);
        value -= days * 86400;
        hours = Math.floor(value / 3600);
        value -= hours * 3600;
        minutes = Math.floor(value / 60);
        value -= minutes * 60;
        seconds = value;
        switch (this.format) {
          case 'styled':
            this.$days.text(this.zeroPrefix(days));
            this.$hours.text(this.zeroPrefix(hours));
            this.$minutes.text(this.zeroPrefix(minutes));
            this.$seconds.text(this.zeroPrefix(seconds));
            break;
          case 'text':
            timerText = (function() {
              switch (false) {
                case !(days > 0):
                  return this.pluralize(days, 'day');
                case !(hours > 0):
                  return this.pluralize(hours, 'hour');
                case !(minutes > 0):
                  return this.pluralize(minutes, 'minute');
                default:
                  return this.pluralize(seconds, 'second');
              }
            }).call(this);
            this.$timerWrapper.text(timerText);
            break;
          case 'digital':
            timerText = [this.zeroPrefix(days), this.zeroPrefix(hours), this.zeroPrefix(minutes), this.zeroPrefix(seconds)].join(':');
            this.$timerWrapper.text(timerText);
        }
        return timerValue;
      };

      ScarcitySamuraiTimer.prototype.onExpire = function() {
        if (this.redirectURL != null) {
           window.onbeforeunload = null;
           window.location = this.redirectURL;
        }
        if (this.hideDiv != null) {
          $(this.hideDiv).hide();
        }
        
       
      };

      return ScarcitySamuraiTimer;

    })();
    if (scarcitySamuraiData.timer != null) {
      _ref = scarcitySamuraiData.timer;
      for (timerId in _ref) {
        timerData = _ref[timerId];
        new ScarcitySamuraiTimer($(".ss-timer-" + timerId), timerData);
      }
    }
    if (scarcitySamuraiData.end_time_timer != null) {
      new ScarcitySamuraiTimer($(), scarcitySamuraiData.end_time_timer);
    }
    return $('.ss-inline-timer').each(function() {
      var format, timestamp;
      timestamp = parseInt($(this).data('ss-timer-timestamp'));
      if (isNaN(timestamp)) {
        timestamp = null;
      }
      format = $(this).data('ss-timer-format');
      timerData = {
        deadline: timestamp != null ? timestamp : scarcitySamuraiData.end_time_timer.deadline,
        format: format
      };
      return new ScarcitySamuraiTimer($(this), timerData);
    });
  });

}).call(this);

Exemplo01.html

<!DOCTYPE html>
<!-- saved from url=(0054)http://descomplicaexcel.com.br/contador/Exemplo01.html -->
<html lang="en-US" class=""><!--<![endif]--><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">




<!-- META TAG NECESSÁRIA PARA RESPONSIVE DESIGN -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">


<style id="ss-banner-styles-inline-css" type="text/css">
.ss-banner-top{
	position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}
.ss-banner-1 .ss-banner {
	background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ff3333), to(#9c0000));
	background-image: -webkit-linear-gradient(top, #ff3333, #9c0000);
	background-color: #cf0000;
	background-image: -moz-linear-gradient(top, #ff3333, #9c0000);
	background-image: -ms-linear-gradient(top, #ff3333, #9c0000);
	background-image: -o-linear-gradient(top, #ff3333, #9c0000);
	background-image: linear-gradient(top, #ff3333, #9c0000);
	background-repeat: repeat-x;
	color: #ffffff;
	-webkit-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
	-moz-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
	font-family: Arial, sans-serif, sans-serif;
}

.ss-banner-1 .ss-banner .ss-banner-element-wrapper {
	display: inline-block;
	*display: inline;
	zoom: 1;
	margin: 0 5px;
	vertical-align: middle;
	position: relative;
}

.ss-banner-1 .ss-banner .ss-banner-content {
	font-size: 30px;
	text-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
	text-align: center;
	padding: 15px;
	overflow: hidden;
	white-space: nowrap;
}
.ss-banner-1 .ss-timer {
	position: relative;
	padding-top: 20px;
	top: -20px;
	margin-bottom: -20px;
}

.ss-banner-1 .ss-timer .ss-timer-days,
.ss-banner-1 .ss-timer .ss-timer-hours,
.ss-banner-1 .ss-timer .ss-timer-minutes,
.ss-banner-1 .ss-timer .ss-timer-seconds {
	display: -moz-inline-stack;
	display: inline-block;
	zoom: 1;
	*display: inline;
}

.ss-banner-1 .ss-timer .ss-timer-label {
	display: block;
	-webkit-border-radius: 10px;
	-moz-border-radius: 10px;
	border-radius: 10px;
	font-family: Arial, sans-serif;
	color: #ffffff;
	background: #9c0000;
	padding: 2px 7px;
	font-weight: normal;
	font-size: 9px;
	margin: 0 0 4px 0;
	line-height: 1.2em;
	text-transform: uppercase;
}

.ss-banner-1 .ss-timer .ss-timer-value {
	display: block;
	min-width: 40px;
	height: 32px;
	line-height: 32px;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
	background-color: #ffffff;
	*zoom: 1;
	filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFFFFFF', endColorstr='#FFFFFFFF');
	background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(3%, #e6e6e6), color-stop(54%, #e5e5e5), color-stop(55%, #c5c5c5), color-stop(55%, #ffffff), color-stop(100%, #ffffff));
	background-image: -webkit-linear-gradient(top, #ffffff 0%, #e6e6e6 3%, #e5e5e5 54%, #c5c5c5 55%, #ffffff 55%, #ffffff 100%);
	background-image: -moz-linear-gradient(top, #ffffff 0%, #e6e6e6 3%, #e5e5e5 54%, #c5c5c5 55%, #ffffff 55%, #ffffff 100%);
	background-image: -o-linear-gradient(top, #ffffff 0%, #e6e6e6 3%, #e5e5e5 54%, #c5c5c5 55%, #ffffff 55%, #ffffff 100%);
	background-image: linear-gradient(top, #ffffff 0%, #e6e6e6 3%, #e5e5e5 54%, #c5c5c5 55%, #ffffff 55%, #ffffff 100%);
	-webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.3);
	-moz-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.3);
	box-shadow: 0 3px 3px rgba(0, 0, 0, 0.3);
	color: #000000;
	font-size: 32px;
	padding: 3px;
	margin: 2px 0;
	font-family: Arial, sans-serif;
	text-align: center;
}

@media (max-width: 480px) {
  .ss-banner-1 .ss-banner .ss-banner-content {
    font-size: 50px;
    overflow: visible!important;
    white-space:normal;!important;
  }

}


</style>



<script type="text/javascript" src="./Exemplo01_files/jquery.js"></script><style type="text/css"></style>

<script type="text/javascript">
/* <![CDATA[ */
/* PERGUNTAR COMO FECHAR A DIV QUANDO O TIMER ESGOTAR */
var scarcitySamuraiData = {"page_id":"846","timer":{"2":{"deadline":10}},"now":"1","end_time_timer":{"deadline":10,"hide_div":".ss-banner-1"}};
/* ]]> */
</script>
<script type="text/javascript" src="./Exemplo01_files/timer.js"></script>

</head><body>
<div class="ss-banner-1 ss-banner-wrapper" data-show-after="2220" id="contador">
	<div class="ss-banner-top">
		<div class="ss-banner" style="display: block;">
			<div class="ss-banner-content">
				<span class="ss-banner-element-wrapper ss-banner-text-wrapper">De R$ 197,00 por R$ 147,00 - Essa Oferta Vai Expirar Em:</span>
				<div class="ss-timer-2 ss-banner-element-wrapper ss-banner-timer-wrapper ss-styled-timer ss-timer-style-1">
					<div class="ss-timer">
						<div class="ss-timer-days">
							<span class="ss-timer-days-label ss-timer-label">days</span>
							<span class="ss-timer-value ss-days">00</span>
						</div>
						<div class="ss-timer-hours">
							<span class="ss-timer-hours-label ss-timer-label">hours</span>
							<span class="ss-timer-value ss-hours">00</span>
						</div>
						<div class="ss-timer-minutes">
							<span class="ss-timer-minutes-label ss-timer-label">mins</span>
							<span class="ss-timer-value ss-minutes">00</span>
						</div>
						<div class="ss-timer-seconds">
							<span class="ss-timer-seconds-label ss-timer-label">secs</span>
							<span class="ss-timer-value ss-seconds">05</span>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

<!--
    <script language="javascript" type="text/javascript">
      if (localStorage)
      {
        if ( ! localStorage.getItem('visitei'))
        {
          document.getElementById('contador').style.display='block';

          localStorage.setItem( 'visitei', 'true' );
        }
        else
        {
          document.getElementById('contador').style.display='none';
        }

      }
    </script>
!-->

</div>






</body></html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

 

Fala Josué Alvares Beleza?

 

Cara fiz a alteração no plugin do timer adicionando um atributo e alterando a função expire.

Com base nas variaveis setadas dentro da chave end_time_timer;

 

Está me devendo uma cerveja! rsrsrs

 

Segue os arquivos:

 

timer.js

// Generated by CoffeeScript 1.4.0

/*

LEGAL COPYRIGHT NOTICE

Copyright (c) Noble Samurai Pty Ltd, 2008-2013. All Rights Reserved.

This software is proprietary to and embodies the confidential technology of Noble Samurai Pty Ltd.
Possession, use, dissemination or copying of this software and media is authorised only pursuant
to a valid written license from Noble Samurai Pty Ltd. Questions or requests regarding permission may
be sent by email to legal@noblesamurai.com or by post to PO Box 477, Blackburn Victoria 3130, Australia.
*/


(function() {

  jQuery(function($) {
    var ScarcitySamuraiTimer, serverNow, timerData, timerId, _ref;
    serverNow = parseInt(scarcitySamuraiData.now);
    ScarcitySamuraiTimer = (function() {

      function ScarcitySamuraiTimer($timerWrapper, timerData) {
        var clientNow, _ref,
          _this = this;
        this.$timerWrapper = $timerWrapper;
        this.$days = $('.ss-days', this.$timerWrapper);
        this.$hours = $('.ss-hours', this.$timerWrapper);
        this.$minutes = $('.ss-minutes', this.$timerWrapper);
        this.$seconds = $('.ss-seconds', this.$timerWrapper);
        clientNow = this.getUnixTimestamp();
        this.serverTimeOffset = clientNow - serverNow;
        this.deadline = timerData.deadline;
        if (this.$timerWrapper.is('.ss-styled-timer')) {
          this.format = 'styled';
        } else {
          this.format = (_ref = timerData.format) != null ? _ref : 'text';
        }
        this.redirectURL = timerData.redirect_url;
        this.hideDiv = timerData.hide_div;
        this.value = this.updateTimer();
        this.intervalID = setInterval(function() {
          _this.value = _this.updateTimer();
          if (_this.value > 0) {
            return;
          }
          clearInterval(_this.intervalID);
          _this.onExpire();
        }, 1000);
      }

      ScarcitySamuraiTimer.prototype.getUnixTimestamp = function() {
        return Math.round((new Date()).getTime() / 1000);
      };

      ScarcitySamuraiTimer.prototype.pluralize = function(count, word) {
        return count + ' ' + word + (count === 1 ? '' : 's');
      };

      ScarcitySamuraiTimer.prototype.zeroPrefix = function(number) {
        if (number < 10) {
          return "0" + number;
        } else {
          return "" + number;
        }
      };

      ScarcitySamuraiTimer.prototype.updateTimer = function() {
        var days, hours, minutes, seconds, timerText, timerValue, value;
        timerValue = value = Math.max(this.deadline - this.getUnixTimestamp() + this.serverTimeOffset, 0);
        days = Math.floor(value / 86400);
        value -= days * 86400;
        hours = Math.floor(value / 3600);
        value -= hours * 3600;
        minutes = Math.floor(value / 60);
        value -= minutes * 60;
        seconds = value;
        switch (this.format) {
          case 'styled':
            this.$days.text(this.zeroPrefix(days));
            this.$hours.text(this.zeroPrefix(hours));
            this.$minutes.text(this.zeroPrefix(minutes));
            this.$seconds.text(this.zeroPrefix(seconds));
            break;
          case 'text':
            timerText = (function() {
              switch (false) {
                case !(days > 0):
                  return this.pluralize(days, 'day');
                case !(hours > 0):
                  return this.pluralize(hours, 'hour');
                case !(minutes > 0):
                  return this.pluralize(minutes, 'minute');
                default:
                  return this.pluralize(seconds, 'second');
              }
            }).call(this);
            this.$timerWrapper.text(timerText);
            break;
          case 'digital':
            timerText = [this.zeroPrefix(days), this.zeroPrefix(hours), this.zeroPrefix(minutes), this.zeroPrefix(seconds)].join(':');
            this.$timerWrapper.text(timerText);
        }
        return timerValue;
      };

      ScarcitySamuraiTimer.prototype.onExpire = function() {
        if (this.redirectURL != null) {
           window.onbeforeunload = null;
           window.location = this.redirectURL;
        }
        if (this.hideDiv != null) {
          $(this.hideDiv).hide();
        }
        
       
      };

      return ScarcitySamuraiTimer;

    })();
    if (scarcitySamuraiData.timer != null) {
      _ref = scarcitySamuraiData.timer;
      for (timerId in _ref) {
        timerData = _ref[timerId];
        new ScarcitySamuraiTimer($(".ss-timer-" + timerId), timerData);
      }
    }
    if (scarcitySamuraiData.end_time_timer != null) {
      new ScarcitySamuraiTimer($(), scarcitySamuraiData.end_time_timer);
    }
    return $('.ss-inline-timer').each(function() {
      var format, timestamp;
      timestamp = parseInt($(this).data('ss-timer-timestamp'));
      if (isNaN(timestamp)) {
        timestamp = null;
      }
      format = $(this).data('ss-timer-format');
      timerData = {
        deadline: timestamp != null ? timestamp : scarcitySamuraiData.end_time_timer.deadline,
        format: format
      };
      return new ScarcitySamuraiTimer($(this), timerData);
    });
  });

}).call(this);

Exemplo01.html

<!DOCTYPE html>
<!-- saved from url=(0054)http://descomplicaexcel.com.br/contador/Exemplo01.html -->
<html lang="en-US" class=""><!--<![endif]--><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">




<!-- META TAG NECESSÁRIA PARA RESPONSIVE DESIGN -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">


<style id="ss-banner-styles-inline-css" type="text/css">
.ss-banner-top{
	position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}
.ss-banner-1 .ss-banner {
	background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ff3333), to(#9c0000));
	background-image: -webkit-linear-gradient(top, #ff3333, #9c0000);
	background-color: #cf0000;
	background-image: -moz-linear-gradient(top, #ff3333, #9c0000);
	background-image: -ms-linear-gradient(top, #ff3333, #9c0000);
	background-image: -o-linear-gradient(top, #ff3333, #9c0000);
	background-image: linear-gradient(top, #ff3333, #9c0000);
	background-repeat: repeat-x;
	color: #ffffff;
	-webkit-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
	-moz-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
	font-family: Arial, sans-serif, sans-serif;
}

.ss-banner-1 .ss-banner .ss-banner-element-wrapper {
	display: inline-block;
	*display: inline;
	zoom: 1;
	margin: 0 5px;
	vertical-align: middle;
	position: relative;
}

.ss-banner-1 .ss-banner .ss-banner-content {
	font-size: 30px;
	text-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
	text-align: center;
	padding: 15px;
	overflow: hidden;
	white-space: nowrap;
}
.ss-banner-1 .ss-timer {
	position: relative;
	padding-top: 20px;
	top: -20px;
	margin-bottom: -20px;
}

.ss-banner-1 .ss-timer .ss-timer-days,
.ss-banner-1 .ss-timer .ss-timer-hours,
.ss-banner-1 .ss-timer .ss-timer-minutes,
.ss-banner-1 .ss-timer .ss-timer-seconds {
	display: -moz-inline-stack;
	display: inline-block;
	zoom: 1;
	*display: inline;
}

.ss-banner-1 .ss-timer .ss-timer-label {
	display: block;
	-webkit-border-radius: 10px;
	-moz-border-radius: 10px;
	border-radius: 10px;
	font-family: Arial, sans-serif;
	color: #ffffff;
	background: #9c0000;
	padding: 2px 7px;
	font-weight: normal;
	font-size: 9px;
	margin: 0 0 4px 0;
	line-height: 1.2em;
	text-transform: uppercase;
}

.ss-banner-1 .ss-timer .ss-timer-value {
	display: block;
	min-width: 40px;
	height: 32px;
	line-height: 32px;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
	background-color: #ffffff;
	*zoom: 1;
	filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFFFFFF', endColorstr='#FFFFFFFF');
	background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(3%, #e6e6e6), color-stop(54%, #e5e5e5), color-stop(55%, #c5c5c5), color-stop(55%, #ffffff), color-stop(100%, #ffffff));
	background-image: -webkit-linear-gradient(top, #ffffff 0%, #e6e6e6 3%, #e5e5e5 54%, #c5c5c5 55%, #ffffff 55%, #ffffff 100%);
	background-image: -moz-linear-gradient(top, #ffffff 0%, #e6e6e6 3%, #e5e5e5 54%, #c5c5c5 55%, #ffffff 55%, #ffffff 100%);
	background-image: -o-linear-gradient(top, #ffffff 0%, #e6e6e6 3%, #e5e5e5 54%, #c5c5c5 55%, #ffffff 55%, #ffffff 100%);
	background-image: linear-gradient(top, #ffffff 0%, #e6e6e6 3%, #e5e5e5 54%, #c5c5c5 55%, #ffffff 55%, #ffffff 100%);
	-webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.3);
	-moz-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.3);
	box-shadow: 0 3px 3px rgba(0, 0, 0, 0.3);
	color: #000000;
	font-size: 32px;
	padding: 3px;
	margin: 2px 0;
	font-family: Arial, sans-serif;
	text-align: center;
}

@media (max-width: 480px) {
  .ss-banner-1 .ss-banner .ss-banner-content {
    font-size: 50px;
    overflow: visible!important;
    white-space:normal;!important;
  }

}


</style>



<script type="text/javascript" src="./Exemplo01_files/jquery.js"></script><style type="text/css"></style>

<script type="text/javascript">
/* <![CDATA[ */
/* PERGUNTAR COMO FECHAR A DIV QUANDO O TIMER ESGOTAR */
var scarcitySamuraiData = {"page_id":"846","timer":{"2":{"deadline":10}},"now":"1","end_time_timer":{"deadline":10,"hide_div":".ss-banner-1"}};
/* ]]> */
</script>
<script type="text/javascript" src="./Exemplo01_files/timer.js"></script>

</head><body>
<div class="ss-banner-1 ss-banner-wrapper" data-show-after="2220" id="contador">
	<div class="ss-banner-top">
		<div class="ss-banner" style="display: block;">
			<div class="ss-banner-content">
				<span class="ss-banner-element-wrapper ss-banner-text-wrapper">De R$ 197,00 por R$ 147,00 - Essa Oferta Vai Expirar Em:</span>
				<div class="ss-timer-2 ss-banner-element-wrapper ss-banner-timer-wrapper ss-styled-timer ss-timer-style-1">
					<div class="ss-timer">
						<div class="ss-timer-days">
							<span class="ss-timer-days-label ss-timer-label">days</span>
							<span class="ss-timer-value ss-days">00</span>
						</div>
						<div class="ss-timer-hours">
							<span class="ss-timer-hours-label ss-timer-label">hours</span>
							<span class="ss-timer-value ss-hours">00</span>
						</div>
						<div class="ss-timer-minutes">
							<span class="ss-timer-minutes-label ss-timer-label">mins</span>
							<span class="ss-timer-value ss-minutes">00</span>
						</div>
						<div class="ss-timer-seconds">
							<span class="ss-timer-seconds-label ss-timer-label">secs</span>
							<span class="ss-timer-value ss-seconds">05</span>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

<!--
    <script language="javascript" type="text/javascript">
      if (localStorage)
      {
        if ( ! localStorage.getItem('visitei'))
        {
          document.getElementById('contador').style.display='block';

          localStorage.setItem( 'visitei', 'true' );
        }
        else
        {
          document.getElementById('contador').style.display='none';
        }

      }
    </script>
!-->

</div>






</body></html>

Opa, fala Rafael, beleza sim e vc?

 

Cara, tu salvou a minha vida, estava já desanimando de adaptar esse código e como não tenho familiaridade com javascript, tava complicado adaptá-lo para o que eu precisava. Enfim, com certeza vc merece a cerveja, qual gosta? rsrs

Compartilhar este post


Link para o post
Compartilhar em outros sites

Que isso Josué, era brincadeira.

Só para descontrair! rsrsrs

 

Que bom que deu certo!

 

Qualquer coisa manda ai =)

Compartilhar este post


Link para o post
Compartilhar em outros sites

Que isso Josué, era brincadeira.

Só para descontrair! rsrsrs

 

Que bom que deu certo!

 

Qualquer coisa manda ai =)

 

 

Opa, muitíssimo obrigado Rafael.

 

Eu tb fico a disposição.

 

Grande abraço!

Compartilhar este post


Link para o post
Compartilhar em outros sites

@Josué Alvares

 

Marque o tópico como resolvido apontando a resposta que solucionou seu problema. Você também pode avaliá-la positivamente (rep_up.png).

 

Desculpe Lucas, eu acabei esquecendo de fechar o tópico e marcar a resposta do nosso amigo Rafael, perdão mesmo. Obrigado por ter lembrado. Abraço!

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.