Skip to content

Instantly share code, notes, and snippets.

@saleiva
Last active December 11, 2015 12:58
Show Gist options
  • Save saleiva/4604263 to your computer and use it in GitHub Desktop.
Save saleiva/4604263 to your computer and use it in GitHub Desktop.
Delete clicked div and the following ones (jquery)
var array_de_divs = $('div');
$('div').bind('click',function(){
var indice_clickado = $(this).index()
for(i=indice_clickado;i<=a.length-1;i++){
$(a[i]).hide()
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment