The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Web Design
    4. Using More Info javascript:toggleDisplay tag for More info text

    Using More Info javascript:toggleDisplay tag for More info text

    Web Design
    2 2 424
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • EEE3
      EEE3 last edited by

      Is there any harm in using javascript so a user can "toggle" open or closed additional text on a website?

      For example, if a user wants to read more about something, they can click on "More Info" and the text would then appear.

      Google is able to read the text, because I chose a random 8 word section of the text within the More Info and pasted it into a Google Search and the website showed up in search results.

      Just wondering if using this technique would have any negative impact.

      Here's what the code would look like: 
      <a <span="">title</a><a <span="">="Show Tables" href="</a><a class=" " target="_blank">javascript:toggleDisplay('table1')</a>">More Info

      style="display: none;" id="table1"> this is where the text would be, and from this section was where I grabbed text to search with in google.

      Then in the footer, here is the script needed so the more info will work:

      I am by no means an expert in coding/html/javascript.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • TakeshiYoung
        TakeshiYoung last edited by

        Hiding text in this manner is a perfectly acceptable UI choice, and will not negatively impact your site.

        When people talk about hiding text being a negative factor, they are referring to cases where people will stuff tons of keywords into invisible divs, or have text that's the same background as the page, or other methods of presenting the search engine with different content than the user, which is basically cloaking.

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        • First post
          Last post
        • When rel canonical tag used, which page does Google considers for ranking and indexing? A/B test scenario!
          0
          1
          45

        • Multiple sites using same text - how to avoid Google duplicate content penalty?
          pastcatch
          pastcatch
          0
          3
          708

        • What does they use?
          Felip3
          Felip3
          0
          3
          196

        • Image Replacement Using Cufon (Javascript), SEO effects
          zco_seo
          zco_seo
          0
          3
          999

        • Does google prefer expanded text to text that you have to mouse over to show?
          InMarketingWeTrust
          InMarketingWeTrust
          0
          3
          185

        • Text in Images vs. Alt tags
          EGOL
          EGOL
          0
          4
          454

        • Website using javascript to serve up content - SEO Friendly?
          Czubmeister
          Czubmeister
          0
          4
          504

        • Image Replacement Using Cufon (Javascript)
          MentorMate
          MentorMate
          0
          2
          838

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy