{"action":"closed","issue":{"url":"https://api.github.com/repos/alextaujenis/jquery-stuck/issues/3","labels_url":"https://api.github.com/repos/alextaujenis/jquery-stuck/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/alextaujenis/jquery-stuck/issues/3/comments","events_url":"https://api.github.com/repos/alextaujenis/jquery-stuck/issues/3/events","html_url":"https://github.com/alextaujenis/jquery-stuck/issues/3","id":44627259,"number":3,"title":"Option for \"sticky\" class add/removed when actually \"stuck\"","user":{"login":"vaughnanderson","id":2070576,"avatar_url":"https://avatars.githubusercontent.com/u/2070576?v=3","gravatar_id":"","url":"https://api.github.com/users/vaughnanderson","html_url":"https://github.com/vaughnanderson","followers_url":"https://api.github.com/users/vaughnanderson/followers","following_url":"https://api.github.com/users/vaughnanderson/following{/other_user}","gists_url":"https://api.github.com/users/vaughnanderson/gists{/gist_id}","starred_url":"https://api.github.com/users/vaughnanderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaughnanderson/subscriptions","organizations_url":"https://api.github.com/users/vaughnanderson/orgs","repos_url":"https://api.github.com/users/vaughnanderson/repos","events_url":"https://api.github.com/users/vaughnanderson/events{/privacy}","received_events_url":"https://api.github.com/users/vaughnanderson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/alextaujenis/jquery-stuck/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-10-01T22:35:07Z","updated_at":"2016-01-14T21:31:22Z","closed_at":"2016-01-14T21:31:22Z","body":"Currently my CSS has to include something like div[class*=\"position: fixed\"], a nice addition would be to have a class dynamically added and removed when the \"stuck\" element is in it's static state versus stuck respectively.\r\n\r\neg:  \r\n<div class=\"stuck\">Some content to stick</div>\r\n\r\neg: [scroll lower on the page]\r\n<div class=\"stuck is_stuck\">Some content to stick</div>\r\n\r\neg:  [scroll back to top of page]\r\n<div class=\"stuck\">Some content to stick</div>\r\n\r\nThis class name should have a default (\"is_stuck\" or something, who really cares what as long as it makes sense) and allow to be overridden in the options parameter. As I find it commonly fighting against other design elements on the page after scrolling. Especially already fixed elements (the new stuck elements end up behind them instead of under them) Having a \"is_stuck\" class would allow style modications to an element after it's been positioned as fixed. (ie, like add margin, borders, dropshadows, etc...)\r\n\r\nI could write up an example bit of code that would achieve this to submit, just let me know if this would be useful.\r\n"}}