SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist stef25's Avatar
    Join Date
    Nov 2004
    Location
    belgium
    Posts
    465
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    detect presence of scrollbars, possible?

    is there any way that one can detect the presence of vertical scroll bars in the browser, using javascript (pref jquery)? perhaps there is a roundabout way like detecting the height of the main wrapper div and comparing it with the available space on the screen? if the former is larger then scrollbars should be present.

    anyone?
    I need someone to protect me from
    all the measures they take in order to protect me

  2. #2
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stef25 View Post
    perhaps there is a roundabout way like detecting the height of the main wrapper div and comparing it with the available space on the screen?
    That would be my suggestion as well. This page should contain the information you need to put such a function together:
    http://www.quirksmode.org/dom/w3c_cssom.html


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
  •