Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Show/Hide DIVs using JS - hiding text?

show hide divs, z-index, z index, hiding text, Google, penalty

         

moobleguy

11:27 am on Mar 13, 2006 (gmt 0)

10+ Year Member



If you use Javascript to show/hide DIVs with text content does this count as hidden text?

I found plenty of resources here on HOW to implement this but wanted opinions on whether search engines would detect/count and penalise these methods as 'hiding text' - or possibly there are good/bad ways of going about this.

Apart from accessibility issues, the content is viewable by the users so not hidden - it seems a good method to me to get lots of text into a small screen area.

An example is <edited> - there are 3 tabs that swap out content when clicked (looks like z-index is used initially to layer content so none is hidden, then show/hide is used in the javascript)

[edited by: tedster at 5:22 pm (utc) on Mar. 13, 2006]

tedster

5:21 pm on Mar 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree that this can be a useful and legitimate method for constructing a web page. I have used it for several sites, and there has never been a problem.

moobleguy

6:00 pm on Mar 13, 2006 (gmt 0)

10+ Year Member



Thanks tedster - any chance of PMing me the URLs to the sites you use it on?

pageoneresults

6:03 pm on Mar 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've used it for a couple of years without any issues. In fact, it has been a cureall for lengthy pages where returning visitors do not need to see instructions or other repetitive data that they don't want to see. It also helps considerably in moving primary content above the fold (ATF).

Thanks tedster - any chance of PMing me the URLs to the sites you use it on?

Hehehe...

tedster

6:55 pm on Mar 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry, no url. But for a bit more info, in one case I use it on a book seller site with about 2,000 titles. There is a show/hide div function for up to seven bits of information on each product: author's bio, historical value of the book, reviews, table of contents and so on.

This site is over three years old and often has top three placement for the book title, author name, and quite regularly for various keywords in the table of contents and other information that is in an initially hidden div. In fact, we've had a script written that detects the keyword used in search engine referrals and switches that particular div on, if the keyword isn't visible in the main content.

Given all the legitimate reasons for a div to begin its display as hidden, I am convinced that no purely algorithmic penalty could possibly be in place at Google.