SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2008
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jquery, show and hide divs

    I have been using a jquery based plug-in, and what i would like to do is degrade it, so a non js enabled browser will hide the relevant div when js is not enabled, and show a different div with appropriate message content.

    i have followed a couple of tut's which do this on click, but i would like this to occur on page load.

  2. #2
    SitePoint Guru downtroden's Avatar
    Join Date
    Dec 2004
    Location
    illinois
    Posts
    974
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how about creating a class with display:none; and on page load remove that class. If js isn't enabled, it'll still show.
    your brain reacts in the same way whether you are
    looking at something or thinking about it...

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2008
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks.

    I managed to do the css bit, the problem I was having was unhiding it, as i found i needed a different approach with jquery.

    i managed to do this with .show() after the $(document).ready(function()


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •