{"version":"1.0","type":"rich","title":"$.fn.offsetRelative","description":"This example demonstrates how to calculate an element’s position relative to its parent container using a jQuery plugin. It shows the offset difference between the selected element and its closest ancestor, optionally filtered by a CSS selector. The plugin, defined in `jquery.offsetRelative.js`, uses jQuery’s `.offset()` method to retrieve both the element’s and parent’s absolute coordinates, then returns the left and top differences. The code relies on the jQuery library and is packaged as a CommonJS module via `package.json`, making it suitable for both browser and Node.js environments.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-3191472?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}