Adding Hidden text to a simple HTML document.

Discussion in 'HTML & Website Design' started by Live fortheswarm, Mar 13, 2016.

  1. #1
    I would like to add hidden text to an HTML document. This text would be similar to a spoiler warning in a web forum where someone can click the spoiler warning and the text will drop down. What would be the best way to place this in an HTML document.
     
    Live fortheswarm, Mar 13, 2016 IP
  2. Mike In

    Mike In Active Member

    Messages:
    244
    Likes Received:
    5
    Best Answers:
    2
    Trophy Points:
    90
    #2
    Hmm, I just made an example here : https://jsfiddle.net/MikeIn/g8dbgrh8/4/

    You can decorate it as per your req., using css or otherwise.

    Do remember to attach latest version of jQuery 1.x.x .

    If you already have jQuery attached ones in a page, there is no need to attach it twice.
     
    Mike In, Mar 14, 2016 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    1. Why in all that is holy are you using both caps and normal letters in your classnames?
    2. Why are you doing this with javascript?
    3. Why are you adding jQuery for something as banal as this?
    4. Why not just have CSS do the work? https://jsfiddle.net/z21rscwg/1/ <- pure html/css solution
     
    PoPSiCLe, Mar 14, 2016 IP
    Phil S and sarahk like this.
  4. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,280
    Likes Received:
    1,696
    Best Answers:
    31
    Trophy Points:
    475
    #4
    qwikad.com, Mar 14, 2016 IP
    Phil S and PoPSiCLe like this.
  5. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #5
    That one was actually quite fancy :)
     
    PoPSiCLe, Mar 14, 2016 IP
  6. MakeBlog.org

    MakeBlog.org Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6
    This works but is not really viable in a seo perspective because search engines wont like it.
     
    MakeBlog.org, Mar 19, 2016 IP
  7. meet_dilip

    meet_dilip Member

    Messages:
    47
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    48
    #7
    I would go with a modal and a visible button.
     
    meet_dilip, Mar 20, 2016 IP
  8. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #8
    Eh, what? @qwikad.com s solution has absolutely NO effect on search engines' interpretation of a site.
     
    PoPSiCLe, Mar 21, 2016 IP
    Phil S likes this.
  9. Phil S

    Phil S Member

    Messages:
    60
    Likes Received:
    18
    Best Answers:
    4
    Trophy Points:
    35
    #9
    In my book, that is spam. So is any word containing the acronym "SEO". (which makes this spam as well :D)

    People discuss what search engines like and dislike without knowing some of the fundamental concepts of web. You couldn't ever take statementseriously.
    @MakeBlog.org, I hope you realize that "make blog" is bad grammar. And bad grammar is bad for SEO... *uncontrollable laughter*
     
    Phil S, Mar 21, 2016 IP
  10. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,280
    Likes Received:
    1,696
    Best Answers:
    31
    Trophy Points:
    475
    #10
    I stopped worrying about SEO and stuff the moment they said there would be another and another and another update... They may as well go ahead and update themselves into oblivion.
     
    qwikad.com, Mar 21, 2016 IP
    Phil S likes this.