Forums

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

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #234810
    ssmolenm
    Participant

    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.

    #234818
    Shikkediel
    Participant

    Best to share some here here, preferably a small demo…

    #234853
    ssmolenm
    Participant

    i made an example on cssdeck – http://cssdeck.com/labs/collab/eabiyjet

    #234863
    justdan
    Participant

    I grabbed your “example” code and tossed together a quick codepen. Assuming this is what you were after.

    http://codepen.io/justdan/pen/gaZwqa?editors=011

    #234872
    ssmolenm
    Participant

    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 ..

    #234878
    justdan
    Participant

    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.

    http://codepen.io/justdan/pen/BovPzV

    #234888
    ssmolenm
    Participant

    thank you a lot :) really appreciate your help .. works perfect

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.