-3
I’m developing a site that will be just a page and will not have scrolling, I need when I click a < a> close the open div and open the one I passed in href="" from < a>.
-3
I’m developing a site that will be just a page and will not have scrolling, I need when I click a < a> close the open div and open the one I passed in href="" from < a>.
-1
does something like this... when you click on the div, give an Hide to it ( display:None ) and the others you give a show ( display: block )
$( "a" ).click(function({
this.hide(); // ou this.css( 'display', 'none' );
$( "#outrasDIVs" ).show(); // ou $( "#outrasDIVs" ).css( 'display', block );
}));
I have to vote -1
because this.hide();
will give error, and because "#outrasDIVs"
doesn’t make much sense since ID’s have to be unique: and because it should be the other way around. Hide all but one.
Browser other questions tagged javascript jquery div
You are not signed in. Login or sign up in order to post.
Using some front end framwork like Angularjs, Knockout or Ember?
– Caputo
Cool. But what you tried so far?
– Beterraba
duplicate of several questions... this one maybe: http://answall.com/questions/2365/como-esconder-um-sub-menu-vis%C3%Advel-ao-clique-em-outro-menu-em-js/2366#2366
– Sergio
Does that question not help you? http://answall.com/questions/25611/criar-um-menu-accordion-apenas-com-css
– Luiz Vieira
No man, it can’t be with Focus, it’ll be touch.
– Eduardo Franco
Eduardo, without putting your HTML this question is very general and will be closed as duplicate of what is most similar.
– Sergio