Efecto jQuery - Efecto ciego

Descripción

los BlindEl efecto se puede utilizar con mostrar / ocultar / alternar. Esto ciega el elemento o lo muestra al cegarlo.

Sintaxis

Aquí está la sintaxis simple para usar este efecto:

selector.hide|show|toggle( "blind", {arguments}, speed );

Parámetros

Aquí está la descripción de todos los argumentos:

  • direction- La dirección del efecto. Puede ser "vertical" u "horizontal". El valor predeterminado es vertical.

  • mode- El modo del efecto. Puede ser "mostrar" u "ocultar". El valor predeterminado es ocultar.

Ejemplo

A continuación se muestra un ejemplo simple que muestra el uso de este efecto:

<html>
   <head>
      <title>The jQuery Example</title>
      <script type = "text/javascript" 
         src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">
      </script>
		
      <script type = "text/javascript" 
         src = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js">
      </script>
		
      <script type = "text/javascript" language = "javascript">
         $(document).ready(function() {

            $("#hide").click(function(){
               $(".target").hide( "blind", {direction: "horizontal"}, 1000 );
            });

            $("#show").click(function(){
               $(".target").show( "blind", {direction: "horizontal"}, 1000 );
            });
				
         });
      </script>
		
      <style>
         p {background-color:#bca; width:200px; border:1px solid green;}
      </style>
   </head>
	
   <body>
      <p>Click on any of the buttons</p>
		
      <button id = "hide"> Hide </button>
      <button id = "show"> Show</button> 
		
      <div class = "target">
         <img src = "../images/jquery.jpg" alt = "jQuery" />
      </div>
   </body>
</html>

Esto producirá el siguiente resultado:

jquery-effects.htm