Softpedia
 


SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Koken 0.8.4
  • ContentBox 1.5.2
  • jQPlayer 0.5.2
  • SPOILER ALERT! 0.0.2
  • jQuery Mask Plugin 0.9.0
  • Easing Slider 2.1.2
  • Btapp.js 0.2.0
  • WiiFlash 0.4.5
  • Breeze.js 1.3.3
  • TinyMCE Templates 3.0.2
  • Home > Scripts > Development Tools

    Object Position and Size

    download button

    Downloads: 507  Tell us about an update
    User Rating:
    Rated by:
    Good (3.1/5)
    18 user(s)
    Developer:

    Website:

    License / Price:

    Platforms:

    Databases:

    Language:

    Last Updated:

    Category:
    Matt Kruse | More scripts
    javascripttoolbox.com
    Other Free / Open Source License 

    Windows / Linux / Mac OS / BSD / Solaris
    N/A
    JavaScript
    April 29th, 2008, 10:42 GMT
    C: \ Development Tools

     Read user reviews (0)  Refer to a friend  Subscribe

    Object Position and Size description

    Object Position and Size is a JavaScript library used to find the position of an object on the page regardless of the layout, css, or positioning used.

    The goal of this library is simple: Find the position of an object on the page regardless of the layout, css, or positioning used.

    Finding the position of an object on the page seems simple, and many approaches found on the web will show you the simplest case - which will work in most situations.

    However, this approach (of just walking up the offsetParent chain and adding offsetLeft and offsetTop values) will not work in cases where there are elements that scroll (such as a DIV with a scrollable content area) and in other situations. It's necessary to have a more robust function which is built to handle as many possible conditions as possible, so it may be "plugged in" to any layout and work correctly.

    In addition to finding the position of an object, this library also reports back its width and height. Also, it provides a convenience method for setting the position of an object.



    TAGS:

    JavaScript library | Object Position detector | developer tool | JavaScript | library | Object

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM