# offset **Repository Path**: mirrors_defunctzombie/offset ## Basic Information - **Project Name**: offset - **Description**: Get offset of an element within the viewport - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-02-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # offset Get offset of a dom element within the viewport. ## Installation $ component install timoxley/offset ## API ### offset(el) Get offset of an element within the viewport. Example: ```js var offset = require('offset') var target = document.getElementById('target') console.log(offset(target)) // => {top: 69, left: 108} ``` ## Credit Code adapted from jQuery. ## License MIT