{"_id":"sticky-sidebar-v2","_rev":"5-11f94a60cd8cc39216b3a5261626db71","name":"sticky-sidebar-v2","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"sticky-sidebar-v2","description":"A JavaScript plugin for making smart and high performance sticky sidebars.","version":"1.0.0","author":{"name":"Øystein Blixhavn"},"email":"oystein@blixhavn.no","license":"The MIT License (MIT)","homepage":"https://github.com/blixhavn/sticky-sidebar-v2","main":"./dist/sticky-sidebar.js","module":"./src/sticky-sidebar.js","keywords":["sticky","affix","fixed","sidebar","position","javascript","jquery"],"bugs":{"url":"https://github.com/blixhavn/sticky-sidebar-v2/issues"},"scripts":{"build":"gulp","test":"mocha --compilers js:babel-core/register"},"repository":{"type":"git","url":"git+https://github.com/blixhavn/sticky-sidebar-v2.git"},"devDependencies":{"babel":"^6.23.0","babel-plugin-check-es2015-constants":"^6.22.0","babel-plugin-transform-es2015-arrow-functions":"^6.22.0","babel-plugin-transform-es2015-block-scoped-functions":"^6.22.0","babel-plugin-transform-es2015-block-scoping":"^6.24.1","babel-plugin-transform-es2015-classes":"^6.24.1","babel-plugin-transform-es2015-parameters":"^6.24.1","babel-plugin-transform-export-extensions":"^6.22.0","babel-preset-env":"^1.6.0","babel-register":"^6.26.0","chai":"^4.1.2","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-header":"^1.8.9","gulp-rename":"^1.2.2","gulp-rollup":"^2.14.0","gulp-sourcemaps":"^2.6.0","gulp-uglify":"^3.0.0","gulp-util":"^3.0.8","jquery":"^3.3.1","mocha":"^5.0.0","mock-raf":"^1.0.0","rollup":"^0.49.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-commonjs":"^8.2.1","rollup-plugin-eslint":"^4.0.0","rollup-plugin-node-resolve":"^3.0.0","sinon":"^4.4.3"},"gitHead":"fd2e258dc05c1f5d99b6035cc5f241c859fc5a14","_id":"sticky-sidebar-v2@1.0.0","_nodeVersion":"11.15.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-5NxEM02u9q2tDQoz8wME7sm4wWh+D4gQNYV8p5bc68Ac4PsaDxm69EkTjzBoSCpgUhvIiHHepysqXAH/SWoFwQ==","shasum":"cd9130d73fa98ec65995263c915c636ecefa4629","tarball":"https://registry.npmjs.org/sticky-sidebar-v2/-/sticky-sidebar-v2-1.0.0.tgz","fileCount":11,"unpackedSize":114967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGHODCRA9TVsSAnZWagAAN9sP/2ksJ4cbuREd5UjCclRo\nZvFgvL90uTdUa7lkohrPsbsTTodW0RPvrFUDEAWu+emz5ytkDSnDTLpGBYf5\nnFdlKhjzXuJNE/Gsbmrid54Z0dvxj8SeN/286eOzLcQuYDK+43MWN0Pvwd7J\nJCYTeewB3OfENubd6TEQhxF1VtFCjxk2nbyCTTdoEVcQJgXN3PdkMMN3IuPG\nSWl81wR671pjqYBDsymbRR/sbVviqSysH2XX6KR5BDKyld26XwfsCUAYV30/\nFWKjGC3KgdH0xp3juf0B2oPuHYYl54FScr2vZpKfiD9XxKhBcc0x2dbLx/K5\nRJyHK/9LElzj2Xbo1rzPkdEH3G7Sr/9MWLLHfpSFmfbTKCafdC003YGjroVf\nrouO7oeNpxEcnOc8HnZ9W1VPmlH2YrhWKMBrYiApMPa8tnlPBvRLmy3DMnLf\nUWWeJmk5lb65njZMxawrRB6u3OXiVuhHOD+dfbwhbQn86uPgHRygOYWK1e/Y\nVCm3pbxjHRGP4WWOBoRMAF244h00mkRdDlkE4Vt9E5IxJ3i4seTDplB4cnwM\nF1iuKXYufIOSpjhMWiOWSc3OQej20mqMAfctsq63DH+uun33n3izavxwIUDV\niu6TLDcjcPZoWgZ4IH3g1FRaQOBlYimDghH+DP9/yurw450jR3mKkaSqzhLp\nkX7f\r\n=Pdgd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDV+Xw17ShOAv8SzVok9U1hqfW308NxEnoFT4Ni7RjkNwIhAK0/H+F+45cMFjP+bpluBUqFut5c38TQilcuSUTqT3HY"}]},"maintainers":[{"name":"blixhavn","email":"oystein@blixhavn.no"}],"_npmUser":{"name":"blixhavn","email":"oystein@blixhavn.no"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sticky-sidebar-v2_1.0.0_1578660738880_0.566891594112015"},"_hasShrinkwrap":false},"1.0.1":{"name":"sticky-sidebar-v2","description":"A JavaScript plugin for making smart and high performance sticky sidebars.","version":"1.0.1","author":{"name":"Øystein Blixhavn"},"email":"oystein@blixhavn.no","license":"The MIT License (MIT)","homepage":"https://github.com/blixhavn/sticky-sidebar-v2","main":"./dist/sticky-sidebar.js","module":"./src/sticky-sidebar.js","keywords":["sticky","affix","fixed","sidebar","position","javascript","jquery"],"bugs":{"url":"https://github.com/blixhavn/sticky-sidebar-v2/issues"},"scripts":{"build":"gulp","test":"mocha --compilers js:babel-core/register"},"repository":{"type":"git","url":"git+https://github.com/blixhavn/sticky-sidebar-v2.git"},"devDependencies":{"babel":"^6.23.0","babel-plugin-check-es2015-constants":"^6.22.0","babel-plugin-transform-es2015-arrow-functions":"^6.22.0","babel-plugin-transform-es2015-block-scoped-functions":"^6.22.0","babel-plugin-transform-es2015-block-scoping":"^6.24.1","babel-plugin-transform-es2015-classes":"^6.24.1","babel-plugin-transform-es2015-parameters":"^6.24.1","babel-plugin-transform-export-extensions":"^6.22.0","babel-preset-env":"^1.6.0","babel-register":"^6.26.0","chai":"^4.1.2","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-header":"^1.8.9","gulp-rename":"^1.2.2","gulp-rollup":"^2.14.0","gulp-sourcemaps":"^2.6.0","gulp-uglify":"^3.0.0","gulp-util":"^3.0.8","jquery":"^3.3.1","mocha":"^5.0.0","mock-raf":"^1.0.0","rollup":"^0.49.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-commonjs":"^8.2.1","rollup-plugin-eslint":"^4.0.0","rollup-plugin-node-resolve":"^3.0.0","sinon":"^4.4.3"},"gitHead":"1630836a7d55906a12ecb8aee69fcc59abb0d028","_id":"sticky-sidebar-v2@1.0.1","_nodeVersion":"11.15.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-1pcoWoX6YvwC27XV0iaBEVz7TsoMxhfjMtuI4BKSHaebXGtT0DrVaagGCkzkmaIeVEZ2W9uffEXcP+4yEWmXgg==","shasum":"e85395b735b1b9c84206982af80bdcc0c7040e7d","tarball":"https://registry.npmjs.org/sticky-sidebar-v2/-/sticky-sidebar-v2-1.0.1.tgz","fileCount":11,"unpackedSize":115008,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGHj/CRA9TVsSAnZWagAA1gYP/377pD/sbvV02p2/4LwZ\nQ59tu0LIElP7hl6rt7zB4w59N8qME7SeCI6uXqONTcYrpfvojfZ2ixfVEJAs\n6P9ULcfyguKStt9/76Hv2+b1MuaKejhj+RxEg3NlBhr5XwrZweYD2+xOuCkt\n+GYR2QCn7IdMsqAgnuDT2NzGMav4Li6vD/hCAhMdEVr0btH/Uy+jTB0vQGqL\nu3yzBUrPMEAQY8lO1aEHvdnRvGt9bWKSFr32LH872zFd6xWBAWCEJnlZEdXX\nceCCaIp5MSzfwP2kXvVwMstH6JL4sYlw8t1gcfk1HWHMgqjtOe+j3E9Xn9dI\nTvjC1ZGV6MvGWyjED6QKUZarT8SoL3Zmru9qURBfA5t7JUxC39p2xcMszJSr\nitXO7ppmf+DhLEPPWmd+NFy297BI48UPl9W8+JABf1WiO2NYUZQbRxRfnzk+\n6cNp0qtDxB1nK//5tULCFdkM7fOe7m8GrHdSOGR14VRUCq68CkQkC9FApSqC\nd8Q3yG3JXEU8LNXsta+fjVTfuvuwY+Kba26aGoHDGDTsAakceIh7fUesZey5\nD41m33uJclADWvh5ssuX1e/m86U7pdy20u2De0BpYKXeFixlOtCsYNPQ0SHj\nacXG6yb50utIoLN2sJuSLEBErCrLidZZoTKFrAEoid+eGlRDR33HXBqYN3N2\nnOsx\r\n=uJGE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgRumfVq7srZkyXbAToJiFgygoM82KMrzZQhh//38AEwIhAOSonWCiWD4ZLOPcAsQIbx6b0Rw+lxNjj10L358TA9TP"}]},"maintainers":[{"name":"blixhavn","email":"oystein@blixhavn.no"}],"_npmUser":{"name":"blixhavn","email":"oystein@blixhavn.no"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sticky-sidebar-v2_1.0.1_1578662142991_0.7754302195420271"},"_hasShrinkwrap":false},"1.1.0":{"name":"sticky-sidebar-v2","description":"A JavaScript plugin for making smart and high performance sticky sidebars.","version":"1.1.0","author":{"name":"Øystein Blixhavn"},"email":"oystein@blixhavn.no","license":"The MIT License (MIT)","homepage":"https://github.com/blixhavn/sticky-sidebar-v2","main":"./dist/sticky-sidebar.js","module":"./src/sticky-sidebar.js","keywords":["sticky","affix","fixed","sidebar","position","javascript","jquery"],"bugs":{"url":"https://github.com/blixhavn/sticky-sidebar-v2/issues"},"scripts":{"build":"gulp","test":"mocha --compilers js:babel-core/register"},"repository":{"type":"git","url":"git+https://github.com/blixhavn/sticky-sidebar-v2.git"},"devDependencies":{"babel":"^6.23.0","babel-plugin-check-es2015-constants":"^6.22.0","babel-plugin-transform-es2015-arrow-functions":"^6.22.0","babel-plugin-transform-es2015-block-scoped-functions":"^6.22.0","babel-plugin-transform-es2015-block-scoping":"^6.24.1","babel-plugin-transform-es2015-classes":"^6.24.1","babel-plugin-transform-es2015-parameters":"^6.24.1","babel-plugin-transform-export-extensions":"^6.22.0","babel-preset-env":"^1.6.0","babel-register":"^6.26.0","chai":"^4.1.2","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-header":"^1.8.9","gulp-rename":"^1.2.2","gulp-rollup":"^2.14.0","gulp-sourcemaps":"^2.6.0","gulp-uglify":"^3.0.0","gulp-util":"^3.0.8","jquery":"^3.3.1","mocha":"^5.0.0","mock-raf":"^1.0.0","rollup":"^0.49.1","rollup-plugin-babel":"^3.0.2","rollup-plugin-commonjs":"^8.2.1","rollup-plugin-eslint":"^4.0.0","rollup-plugin-node-resolve":"^3.0.0","sinon":"^4.4.3"},"gitHead":"8ec45e3061753ff05448a1fdff3f6d35b1fda473","_id":"sticky-sidebar-v2@1.1.0","_nodeVersion":"10.19.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-2D8J+6eVFaGx0T9mdnrmlZKBmU68qYmu0ug2pr8ZRkhbb/YH/vVq1+xtielMOY2DLeoCmOQnVQmoPr6Ak/F3dg==","shasum":"59fa6ef4a67e43701596b0a1681cf588ae06dc54","tarball":"https://registry.npmjs.org/sticky-sidebar-v2/-/sticky-sidebar-v2-1.1.0.tgz","fileCount":12,"unpackedSize":302977,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqGQQCRA9TVsSAnZWagAA84kP/RzAKGiVm26n/lY0kraH\np89ys8qwhP4MC97BHJyhc7142EMEjckH1f3TGXWjQLQBcQjGDFXtc/UNPngo\nwewAYpZkQECZWST8ZWmO+hxiGeGJvuN5YaNvP3XoXpffpwfhT47csKv0mxi5\nX+8CahJM5Mf1ETq6UnmC5RstXdEV4m9FlzrqG6b5u6eMquiRVWNoKWs1CaZo\nvjh5QPHZe53lrwwPwtAZsISh7j5GfS8Ys0+7bdDbWJuWfLS2MSPKZ4/QTmP3\n459bZXBX9BCbXtM5kJ/6QMtUixJ2GeQbao0EIhmlELPBr43+j+KSXFFlSmMt\n4drEP9ShjRFO4SoGFXLptHLTEIh1WxMo3MOz8DhmGmyLrmBKYpDWU1PbIJi4\nRPPxcey++hXpAjfaO8kzLU+YfQnxKf9mi3teXlj2RTpy4FimWoCwsbW03xdd\nnCfFxJtrv+nrBMNXpEAjgxU5bGozy1z2AXX88vwSyvd04NiL+gE8x9sEo/AH\nwxodWE6OqZDJJtM9nFGyAf0THbCBiMuiXOqIqsUR2ziZBZ6JjQgE9Ak2/Bxb\n3s2fFS6xE6fFGSBm7vi7xsEzTk2wrI35A4capDU58rfN0RTn590AcUlMAwkB\nliUegz6HtKdfCscyIA7CD53Kii4lCaaciQygCMqgr9xKfVv7op83iYCt09qy\nXTwp\r\n=bCQL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFJMEz7EF6RPTS9jxQuXJ0lJk/5F3RvmdWjKnO2gmlCAiAgkqsQQv0t45s86WwKAH70y8ktjvUNkiTCdmZ0JQj1Qg=="}]},"_npmUser":{"name":"blixhavn","email":"oystein@blixhavn.no"},"directories":{},"maintainers":[{"name":"blixhavn","email":"oystein@blixhavn.no"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sticky-sidebar-v2_1.1.0_1604871184270_0.8246910412954929"},"_hasShrinkwrap":true},"1.1.1":{"name":"sticky-sidebar-v2","description":"A JavaScript plugin for making smart and high performance sticky sidebars.","version":"1.1.1","author":{"name":"Øystein Blixhavn"},"email":"oystein@blixhavn.no","license":"The MIT License (MIT)","homepage":"https://github.com/blixhavn/sticky-sidebar-v2","main":"./dist/sticky-sidebar.js","module":"./src/sticky-sidebar.js","keywords":["sticky","affix","fixed","sidebar","position","javascript","jquery"],"bugs":{"url":"https://github.com/blixhavn/sticky-sidebar-v2/issues"},"scripts":{"build":"gulp","test":"mocha --require chai"},"repository":{"type":"git","url":"git+https://github.com/blixhavn/sticky-sidebar-v2.git"},"devDependencies":{"babel":"^6.23.0","@babel/core":"^7.15.5","babel-plugin-check-es2015-constants":"^6.22.0","babel-plugin-transform-es2015-arrow-functions":"^6.22.0","babel-plugin-transform-es2015-block-scoped-functions":"^6.22.0","babel-plugin-transform-es2015-block-scoping":"^6.24.1","babel-plugin-transform-es2015-classes":"^6.24.1","babel-plugin-transform-es2015-parameters":"^6.24.1","babel-plugin-transform-export-extensions":"^6.22.0","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","chai":"^4.3.4","gulp":"^4.0.2","gulp-babel":"^7.0.1","gulp-header":"^2.0.9","gulp-rename":"^2.0.0","gulp-rollup-2":"^1.3.1","gulp-sourcemaps":"^3.0.0","gulp-uglify":"^3.0.2","gulp-util":"^3.0.8","jquery":"^3.6.0","mocha":"^9.1.2","mock-raf":"^1.0.1","rollup":"^2.57.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-eslint":"^7.0.0","rollup-plugin-node-resolve":"^5.2.0","sinon":"^11.1.2"},"gitHead":"c838cd1eecce2251514d963ac178fdb17c759005","_id":"sticky-sidebar-v2@1.1.1","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-AcwFftcYLhSMcXVimMN/peCnraoqU+pnRpvFhO5rcoIdvgPRFNf1Y38126CeKEuRgJffVYRCy9Mdyx4vuqkUqQ==","shasum":"809a7467ffac46b14ed61d5428225cea0f46a3b1","tarball":"https://registry.npmjs.org/sticky-sidebar-v2/-/sticky-sidebar-v2-1.1.1.tgz","fileCount":12,"unpackedSize":709310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh28FgCRA9TVsSAnZWagAABHwP/0wDfKSZXjWAytnYYPUM\n56s/8LKn542tTV1eFkFeaoTgqbPXOOxq+Djv+lHAcASM5uSjJH1SJOkFjAnB\ni+oUCpWplj82isEPHnvzXvkEa1s9btcGLG42bnHeYNJynuyqqFYH/DKvDcU/\nfaDzRjWnQThtvFAyNiwMoOV2yOV7N9CH8l/+1QtlDbSYoahD+dli5pQNZQ95\nMPjerOVUQ6bxcLLeOCPRd8wfh6RJF8FV5bhHF05lhRZ6zTgZU3eSFUY4BDEZ\njhI0qp/fYOAhPjaFxO82C+968450ZQeDr0y/UPcTKmNJcXhscBpsOxky5ji/\n0D3ALhtaM5PPlo1kfU+stKav9WdkT4RAjoxmCaHXZ3l2atWSU7uDBXShzH8R\nEszG4EiOGZ7cji3L8/bjpb8NAOCbtw8TEcdYNyH145KPKYaEITzDOzXEmagJ\nA5mlhXJzDm7+HeHLtsNOls3MKiaIEWUd9OlHS1KPuxO8zGWvcFVhkfT2PNPt\nNN6IHOZ0yjxQywsDWUzChVpEY3trjJVxDJEuTAExLuLEbGCZMGDMP2Irfx3Y\ns/nAadBZn9QXnUy5tOiu+WFGpqgx1f0wSs8C+Ffh5xPPkNnz5WlN1LJcPyR9\nhYlj0QNUBX5Euqwwa5nT17Jpiu500/IGUppbS3JBQ7uFfvydOnp5/W38toNQ\neE0O\r\n=IVS2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDO4UnIVJirllpUT5aeXLdmEMLAzM7KtV1OgweQ6JgmgwIhANrt4JkiLGMHYnc4XvIe18EyUFtxqD3tQ8fDxQuyEHrP"}]},"_npmUser":{"name":"blixhavn","email":"oystein@blixhavn.no"},"directories":{},"maintainers":[{"name":"blixhavn","email":"oystein@blixhavn.no"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sticky-sidebar-v2_1.1.1_1633084490372_0.68686795779823"},"_hasShrinkwrap":true}},"time":{"created":"2020-01-10T12:52:18.880Z","1.0.0":"2020-01-10T12:52:19.033Z","modified":"2022-05-18T18:02:37.608Z","1.0.1":"2020-01-10T13:15:43.135Z","1.1.0":"2020-11-08T21:33:04.404Z","1.1.1":"2021-10-01T10:34:50.546Z"},"maintainers":[{"name":"blixhavn","email":"oystein@blixhavn.no"}],"description":"A JavaScript plugin for making smart and high performance sticky sidebars.","homepage":"https://github.com/blixhavn/sticky-sidebar-v2","keywords":["sticky","affix","fixed","sidebar","position","javascript","jquery"],"repository":{"type":"git","url":"git+https://github.com/blixhavn/sticky-sidebar-v2.git"},"author":{"name":"Øystein Blixhavn"},"bugs":{"url":"https://github.com/blixhavn/sticky-sidebar-v2/issues"},"license":"The MIT License (MIT)","readme":"# Sticky Sidebar v2 [![Build Status](https://travis-ci.org/blixhavn/sticky-sidebar-v2.svg?branch=master)](https://travis-ci.org/blixhavn/sticky-sidebar-v2)\n\nPure JavaScript plugin for making smart and high performance sticky sidebars, originally written by [Ahmed Bouhuolia](https://github.com/abouolia).\n\n## Why the fork?\nThis project was forked from the original [Sticky Sidebar](https://github.com/abouolia/sticky-sidebar), written by [Ahmed Bouhuolia](https://github.com/abouolia).\nAs the original project is currently inactive, this fork is an attempt to revive the project and add some improvements.\n\n\n## Examples\n[Basic Example](https://blixhavn.github.io/sticky-sidebar-v2/examples/basic.html)\n\n[Scrollable Sticky Element](https://blixhavn.github.io/sticky-sidebar-v2/examples/scrollable-element.html)\n\nFor complete documentation and examples see [blixhavn.github.com/sticky-sidebar-v2](http://blixhavn.github.com/sticky-sidebar-v2)\n\n\n## Why is sticky sidebar so awesome?\n\n* It does not re-calculate all dimensions when scrolling, just necessary dimensions.\n* Super smooth without incurring scroll lag or jank and no page reflows.\n* It has event trigger on each affix type to hook your code under particular situation.\n* Handle the sidebar when is tall or too short compared to the rest of the container.\n* Zero dependencies and super simple to setup.\n\n## Install\n\nYou can download sticky sidebar v2 vjQuery plugin from Yarn, NPM or just simply download it from this page and link to the ``sticky-sidebar.js`` file in your project folder.\n\n#### Yarn\n\nIf you are using Yarn as package manager:\n\n````\nyarn add sticky-sidebar-v2\n````\n\n#### NPM\n\nIf you are using NPM as package manager:\n\n````\nnpm install sticky-sidebar-v2\n````\n\n## Usage\n\nYour website's html structure has to be similar to this in order to work:\n\n````html\n<div class=\"main-content\">\n    <div class=\"sidebar\">\n        <div class=\"sidebar__inner\">\n            <!-- Content goes here -->\n        </div>\n    </div>\n    <div class=\"content\">\n        <!-- Content goes here -->\n    </div>\n</div>\n````\n\nNote that inner sidebar wrapper ``.sidebar__inner`` is optional but highly recommended, if you don't write it yourself, the script will create one for you under class name ``inner-wrapper-sticky``. but this may cause many problems.\n\nIf your content is inside a fixed-height div with a scrollbar, this must be specified with the ``scrollContainer`` option.\n\nFor the above example, you can use the following JavaScript:\n\n````html\n<script type=\"text/javascript\" src=\"./js/sticky-sidebar.js\"></script>\n\n<script type=\"text/javascript\">\n  var sidebar = new StickySidebar('.sidebar', {\n    topSpacing: 20,\n    bottomSpacing: 20,\n    containerSelector: '.main-content',\n    innerWrapperSelector: '.sidebar__inner',\n    scrollContainer: '#main-viewport'\n  });\n</script>\n````\n\n#### Via jQuery/Zepto\n\nYou can configure sticky sidebar as a jQuery plugin, just include ``jquery.sticky-sidebar.js`` instead ``sticky-sidebar.js`` file than configure it as any jQuery plugin.\n\n````html\n<script type=\"text/javascript\" src=\"./js/jquery.js\"></script>\n<script type=\"text/javascript\" src=\"./js/jquery.sticky-sidebar.js\"></script>\n\n<script type=\"text/javascript\">\n  $('#sidebar').stickySidebar({\n    topSpacing: 60,\n    bottomSpacing: 60\n  });\n</script>\n````\n\nMake sure to include ``sticky-sidebar.js`` script file after ``jquery.js``.\n\n## Browser Support\n\nSticky Sidebar v2 works in all modern browsers including Internet Explorer 9 and above, but if you want it to work with IE9, should include [`requestAnimationFrame`](https://gist.github.com/paulirish/1579671) polyfill before sticky sidebar code. For backwards compatibility, a polyfill for [ResizeObserver](https://github.com/pelotoncycle/resize-observer) can also be included.\n\nIf you have any issues with browser compatibility don’t hesitate to [Submit an issue](https://github.com/blixhavn/sticky-sidebar-v2/issues/new).\n\n## License\n\nSticky Sidebar v2 is released under the MIT license. Have at it.\n\n-------\n\nMaintained by Øystein Blixhavn\n\nOriginally made by Ahmed Bouhuolia","readmeFilename":"README.md"}