Ver Mensaje Individual
  #6 (permalink)  
Antiguo 24/09/2014, 08:33
PHPeros
Colaborador
 
Fecha de Ingreso: septiembre-2013
Ubicación: España
Mensajes: 3.648
Antigüedad: 11 años
Puntos: 578
Respuesta: iframe con height auto

A ver si puedo hacer algo...

Como son dos iframes, supongo que falla porque solo recoges el tamaño del primero. Tal vez se solucione usando .each():

Código Javascript:
Ver original
  1. var lastHeight = 0, curHeight = 0, $frame = $('iframe');
  2.  
  3. $frame.each(function(){
  4.     curHeight = this.contents().find('body').height();
  5.     if ( curHeight != lastHeight ) {
  6.         this.height(lastHeight = curHeight);
  7.     }
  8. });