January 3, 201214 yr I've got a piece of jQuery script, that hides divs until a link is clicked. The image below shows this. Each arrowed rectangle is a link, and when clicked on a div opens up below, with more information. It's all working and there's no problem with it. I've just got to put the content in each div ( you can see it here: http://basewebdesign...site-design.php). What I'm trying to consider is what happens when javascript is disabled in the browser. I know I can use content enclosed in the <noscript> tag, and this will only display if javascript is disabled in the browser. I know I can just put the hidden content of the divs into the noscript tags, and it will then output them if js is disabled. This increases bloat on the page though, as there would be two versions of the same content on the page. I thought of a way around this, but I'm not sure if it will work, and that's what I'm asking. If I created a php file, with the same content as the hidden divs, and then used an include in the nofollow tags, would the include only work if js was disabled? Thanks in advance, Stu EDIT: Scratch that, the php include is still output, just tried it Edited January 3, 201214 yr by StuartPB
January 3, 201214 yr Have all the divs default to visible, and do the initial hiding with javascript.
Create an account or sign in to comment