Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/04/2011, 13:13
Avatar de ras_chalo
ras_chalo
 
Fecha de Ingreso: junio-2010
Mensajes: 369
Antigüedad: 13 años, 10 meses
Puntos: 6
como ocultar esta el codigo de javascript en mi web??

hola, bueno mi problema es que estoy implementando en un sitio web un efecto en javascript y para varios elemntos el sitio.

lo que necesito es encapsular la información de lo script..como puedo hacer?

ac el código

Código Javascript:
Ver original
  1. <script type="text/javascript">
  2.         $(document).ready(function() {
  3.  
  4.             $("a[rel=example_group]").fancybox
  5.             ({
  6.                 'transitionIn'      : 'none',
  7.                 'transitionOut'     : 'none',
  8.                 'titlePosition'     : 'over',
  9.                 'titleFormat'       : function(title, currentArray, currentIndex, currentOpts)
  10.                 {
  11.                     return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
  12.                 }
  13.             });
  14.  
  15.            
  16.             $("#various1").fancybox({
  17.                 'width'             : '50%',
  18.                 'height'            : '100%',
  19.                 'autoScale'         : false,
  20.                 'transitionIn'      : 'none',
  21.                 'transitionOut'     : 'none',
  22.                 'type'              : 'iframe'
  23.             });
  24.            
  25.             $("#various2").fancybox({
  26.                 'width'             : '50%',
  27.                 'height'            : '100%',
  28.                 'autoScale'         : false,
  29.                 'transitionIn'      : 'none',
  30.                 'transitionOut'     : 'none',
  31.                 'type'              : 'iframe'
  32.             });
  33.            
  34.             $("#various3").fancybox({
  35.                 'width'             : '50%',
  36.                 'height'            : '100%',
  37.                 'autoScale'         : false,
  38.                 'transitionIn'      : 'none',
  39.                 'transitionOut'     : 'none',
  40.                 'type'              : 'iframe'
  41.             });
  42.            
  43.             $("#various4").fancybox({
  44.                 'width'             : '50%',
  45.                 'height'            : '100%',
  46.                 'autoScale'         : false,
  47.                 'transitionIn'      : 'none',
  48.                 'transitionOut'     : 'none',
  49.                 'type'              : 'iframe'
  50.             });
  51.            
  52.             $("#various5").fancybox({
  53.                 'width'             : '50%',
  54.                 'height'            : '100%',
  55.                 'autoScale'         : false,
  56.                 'transitionIn'      : 'none',
  57.                 'transitionOut'     : 'none',
  58.                 'type'              : 'iframe'
  59.             });
  60.            
  61.             $("#various6").fancybox({
  62.                 'width'             : '50%',
  63.                 'height'            : '100%',
  64.                 'autoScale'         : false,
  65.                 'transitionIn'      : 'none',
  66.                 'transitionOut'     : 'none',
  67.                 'type'              : 'iframe'
  68.             });
  69.                                    
  70.         });
  71.     </script>


saludos!