Created
January 22, 2013 21:51
-
-
Save Sandrucola/4598804 to your computer and use it in GitHub Desktop.
Al hacer click en elemento, tienen que desaparecer todos los que están a continuación.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Opción 1: hide, desaparecen al instante al hacer click. | |
$("div").bind("click",function(){ | |
$(this).nextAll ('div').hide();}) | |
//Opción 2: animate, desaparecen en un tiempo establecido al hacer click, bajando la opacidad hasta 0. | |
$("div").bind("click",function(){ | |
$(this).nextAll ('div').animate({ | |
opacity:0 | |
},500,null) | |
}) | |
//Opción 3:fadeOut, desaparecen en un tiempo preestablecido al hacer click, bajando la opacidad hasta 0, auqnue el tiempo también se puede controlar poniendolo entre los paréntesis. | |
$("div").bind("click",function(){ | |
$(this).nextAll ('div').fadeOut();}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment