Results 1 to 3 of 3

Thread: Using Javascript to change the display property of DIV tags

  1. #1
    Join Date
    Sep 2013

    Post Using Javascript to change the display property of DIV tags

    I'm trying to use Javascript to create a tabbed box that will display different text according to which tab is clicked. I've been trying to us display:none to allow the text to occupy the same space and then use Javascript to change the display properties when a tab is clicked but I can't seem to get it to work.
    I am a complete novice in Javascript and have only been using HTML and CSS for a few months so I'd appreciate any advice you can give.
    Also, I'm attempting to get better with self-study so an explanation of code would be great.
    Thanks, MisguidedTree

  2. #2
    Join Date
    May 2006
    Somewhere behind your screen
    where is the code?
    xxx: Guess Buddhist riddle: "What is the sound of one hand clapping?"
    yyy: facepalm

  3. #3
    Join Date
    Sep 2013
    Hope the below code helps you to come out of your problem.

    $('div').filter(function() {
    return $(this).css('display') == 'none'; //or whatever you want to filter.
    See it in action.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles