Report abuse


			
//timeout tem que ser global
var clickTimeout;

$(".text").hide();

$(".verdetalhe").click(function() {
  show($(this));
  return false;
});

function show(el) {
  // vai que o usuário clicou 2 vezes rápidão, então zera o timeout sempre
  clearTimeout(clickTimeout);
  var $this = $(el);

  var $text = $this.next();

  $text.show();

  //timeout evita loop infinito no IE
  clickTimeout = setTimeout(function() {
	$this.click(function() {
	  hide($this);
	  return false;
	});
  }, 100);
}

function hide(el) {
  clearTimeout(clickTimeout);
  var $this = $(el);

  var $text = $this.next();

  $text.hide();

  //timeout evita loop infinito no IE
  clickTimeout = setTimeout(function() {
	$this.click(function() {
	  show($this);
	  return false;
	});
  }, 100);
}