- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › js – when click on a element it will show only ralated div
Hello, i am new to JS and quite stucked.
My problem is that i have something like second menu crated with divs which are then linked nowhere.
Then there is a space made for 3 div which are already created but their class=”hide” make them not display.
I am looking for a JS code which would after clicking on certain a element (div) from second menu changes divs underneath.
Best to share some here here, preferably a small demo…
i made an example on cssdeck – http://cssdeck.com/labs/collab/eabiyjet
I grabbed your “example” code and tossed together a quick codepen. Assuming this is what you were after.
this is right what i was looking for .. but still have some problem when i copy exactly the same code and link my .js file to html it will not work as in the preview on codepen .. i tried also link jquery library to my html.. still not working ..
I should have mentioned I made some changes to the html and css. I made another quick pen to keep things as close as I can to what you have already.
thank you a lot :) really appreciate your help .. works perfect