Ver Mensaje Individual
  #9 (permalink)  
Antiguo 14/01/2013, 09:37
gebremswar
 
Fecha de Ingreso: enero-2012
Ubicación: Santiago de Surco, Lima - Perú
Mensajes: 266
Antigüedad: 12 años, 2 meses
Puntos: 57
Información ColorBox redimensionable (ejemplo)

el_loco90. No me extraña que algo que estando mal "funcione" en IE y que por obvias razones no lo haga en Firefox o Chrome.

Dejando de lado ese tema. Revisa este ejemplo que preparé:

index.html
Código Javascript:
Ver original
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Primary ColorBox</title>
  6. <link rel="stylesheet" type="text/css" href="../../JQueryPlugin/colorbox/example1/colorbox.css">
  7. <script src="http://code.jquery.com/jquery.min.js"></script>
  8. <script src="https://raw.github.com/jackmoore/colorbox/master/colorbox/jquery.colorbox.js"></script>
  9. <script>
  10. $(function(){
  11.     $('a.primary').colorbox({iframe:true, height:"200", width:"300", scrolling:false})
  12. });
  13. </script>
  14. </head>
  15. <body>
  16. <div id="site">
  17.     <a href="colorbox-primary.html" class="primary">Primary ColorBox</a>
  18. </div>
  19. </body>
  20. </html>

colorbox-primary.html
Código HTML:
Ver original
  1. <!doctype html>
  2. <meta charset="utf-8">
  3. <title>Primary ColorBox</title>
  4. <style type="text/css">
  5. #wrapper {background-color:yellow;height:200px;width:300px}
  6. </head>
  7. <div id="wrapper">
  8.    <div>PRIMARY BOX</div>
  9.    <a href="colorbox-secondary.html" class="secondary">Secondary ColorBox</a>
  10. </div>
  11. </body>
  12. </html>

colorbox-secondary.html
Código Javascript:
Ver original
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Secondary ColorBox</title>
  6. <style>
  7. #page {background-color:greenyellow;height:300px;width:400px}
  8. </style>
  9. <script src="http://code.jquery.com/jquery.min.js"></script>
  10. <script src="https://raw.github.com/jackmoore/colorbox/master/colorbox/jquery.colorbox.js"></script>
  11. <script>
  12. $(function(){
  13.     parent.$.colorbox.resize({height:$('#page').height(),width:$('#page').width()});
  14. });
  15. </script>
  16. </head>
  17. <body>
  18. <div id="page">
  19. Content page
  20. </div>
  21. </body>
  22. </html>
Preparé el ejemplo partiendo del problema que describiste en el primer mensaje.

Importante: en el index.html cambia la ruta del la hoja de estilos del plugin colorbox.css por una que tengas disponible y prueba el ejemplo tal cual.

Coméntanos tus dudas.

Saludos.