{"action":"created","issue":{"url":"https://api.github.com/repos/rochal/jQuery-slimScroll/issues/263","repository_url":"https://api.github.com/repos/rochal/jQuery-slimScroll","labels_url":"https://api.github.com/repos/rochal/jQuery-slimScroll/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/rochal/jQuery-slimScroll/issues/263/comments","events_url":"https://api.github.com/repos/rochal/jQuery-slimScroll/issues/263/events","html_url":"https://github.com/rochal/jQuery-slimScroll/issues/263","id":167580830,"number":263,"title":"alwaysVisible:true and scrollTo  scrollbar disappear issue","user":{"login":"catiraumihail","id":6123089,"avatar_url":"https://avatars.githubusercontent.com/u/6123089?v=3","gravatar_id":"","url":"https://api.github.com/users/catiraumihail","html_url":"https://github.com/catiraumihail","followers_url":"https://api.github.com/users/catiraumihail/followers","following_url":"https://api.github.com/users/catiraumihail/following{/other_user}","gists_url":"https://api.github.com/users/catiraumihail/gists{/gist_id}","starred_url":"https://api.github.com/users/catiraumihail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catiraumihail/subscriptions","organizations_url":"https://api.github.com/users/catiraumihail/orgs","repos_url":"https://api.github.com/users/catiraumihail/repos","events_url":"https://api.github.com/users/catiraumihail/events{/privacy}","received_events_url":"https://api.github.com/users/catiraumihail/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-26T11:05:16Z","updated_at":"2016-12-23T21:42:39Z","closed_at":null,"body":"Hi! Very nice plugin.\nMy issue is following:\n\n1) initiate plugin with code\n`\n$('.slimscroll').slimScroll({\n        position: 'right',\n        height: '425px',\n        railVisible: true,\n        alwaysVisible: true,\n        color: '#f00'\n    });\n`\n\n2) try to dynamically scroll to element inside\n`\n    var ii_sel = $('.inside-item[data-id=12]');\n    $('.slimscroll').slimScroll({ scrollTo: ii_sel.position().top });\n`\n\nContent scrolls well, but the problem is after scrolling the scrollbar is disappearing. \n\nThis happens because plugin is not checking very well previous instance.\nProblem solutions:\n- when plugin is instantiated first time add data property with initial options and when is called second time load options from data and extend with current passed options.\n\n`\n    // check for an old instance\n    var old_instance = me.data('slimScroll');\n\n```\nif(old_instance){ // true - has previous instance\n    // use previous options\n    o = $.extend(me.data('slimScroll'), options);\n    // update instance options\n    me.data('slimScroll', o);\n} else { // false  - no previous instance\n    // set initial options\n    me.data('slimScroll', o);\n} \n```\n\n`\n"},"comment":{"url":"https://api.github.com/repos/rochal/jQuery-slimScroll/issues/comments/269048669","html_url":"https://github.com/rochal/jQuery-slimScroll/issues/263#issuecomment-269048669","issue_url":"https://api.github.com/repos/rochal/jQuery-slimScroll/issues/263","id":269048669,"user":{"login":"umair-khanzada","id":8782817,"avatar_url":"https://avatars.githubusercontent.com/u/8782817?v=3","gravatar_id":"","url":"https://api.github.com/users/umair-khanzada","html_url":"https://github.com/umair-khanzada","followers_url":"https://api.github.com/users/umair-khanzada/followers","following_url":"https://api.github.com/users/umair-khanzada/following{/other_user}","gists_url":"https://api.github.com/users/umair-khanzada/gists{/gist_id}","starred_url":"https://api.github.com/users/umair-khanzada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umair-khanzada/subscriptions","organizations_url":"https://api.github.com/users/umair-khanzada/orgs","repos_url":"https://api.github.com/users/umair-khanzada/repos","events_url":"https://api.github.com/users/umair-khanzada/events{/privacy}","received_events_url":"https://api.github.com/users/umair-khanzada/received_events","type":"User","site_admin":false},"created_at":"2016-12-23T21:42:39Z","updated_at":"2016-12-23T21:42:39Z","body":"How you resolved this issue.\r\ncan you please share your experience with me ?\r\n"}}
{"actor":{"display_login":"umair-khanzada"}}