Displaying content if javascript is disabled

Hi there,

I have a jQuery banner slider, but I would like to know if it is possible to display different content (or the first slide only), if JavaScript is disabled.

This is my content:


<div id="slider">
      <ul id="slider1">
        
        <!-- slide #1 -->
        <li>
          <h1>my heading</h1>
          <h2>sub heading</h2>
              <p>slide content</p>
        </li>
        <!-- end slide #1 --> 
        
        <!-- slide #2 -->
        <li>
          <h1>my heading</h1>
          <h2>sub heading</h2>
              <p>slide content</p>
        </li>
        <!-- end slide #2 -->
        
      </ul>
    </div>

Any help would be great! Thanks

To have content that displays if JavaScript is disabled you simply include it in the page to start with. You then hide it using JavaScript. If JavaScript is disabled then the code to hide it doesn’tr run and that content remains visible.

You can also do it with blocks of content by wrapping the block in <noscript> tags but using JavaScript is more lfexible as you can update inline content rather than just blocks as well as testing that the JavaScript commands your script uses are available.