{"action":"opened","issue":{"url":"https://api.github.com/repos/lokku/jquery-nstslider/issues/20","labels_url":"https://api.github.com/repos/lokku/jquery-nstslider/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/lokku/jquery-nstslider/issues/20/comments","events_url":"https://api.github.com/repos/lokku/jquery-nstslider/issues/20/events","html_url":"https://github.com/lokku/jquery-nstslider/issues/20","id":65065931,"number":20,"title":"Suggestion with non-crossable grips","user":{"login":"thinkMichel","id":813869,"avatar_url":"https://avatars.githubusercontent.com/u/813869?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkMichel","html_url":"https://github.com/thinkMichel","followers_url":"https://api.github.com/users/thinkMichel/followers","following_url":"https://api.github.com/users/thinkMichel/following{/other_user}","gists_url":"https://api.github.com/users/thinkMichel/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkMichel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkMichel/subscriptions","organizations_url":"https://api.github.com/users/thinkMichel/orgs","repos_url":"https://api.github.com/users/thinkMichel/repos","events_url":"https://api.github.com/users/thinkMichel/events{/privacy}","received_events_url":"https://api.github.com/users/thinkMichel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-29T14:24:41Z","updated_at":"2015-03-29T14:24:41Z","closed_at":null,"body":"Given the custom style:\r\n![image ](https://cloud.githubusercontent.com/assets/813869/6885941/0cd08992-d62c-11e4-9bbf-e5c8fceb82cc.png) ![image](https://cloud.githubusercontent.com/assets/813869/6886018/d355b648-d62f-11e4-9d1f-ac5d1b949694.png)\r\n\r\n\r\nI wanted the handles not to cross, but also not overlap. I understand that this would currently result in the fact that the range values will not be the same on left and right. Which is fine for my use-case. \r\n\r\nI modified the function \"validateAndMoveGripsToPx\", and included a conditional statement tin the if statement (last part:)\r\n```javascript\r\n  'validateAndMoveGripsToPx': function (nextLeftGripPositionPx, nextRightGripPositionPx) {\r\n            var $this = this;\r\n\r\n            //[! edit:\r\n            settings = $this.data('settings'); // added settings to get crossable_handles value\r\n            // end edit !]\r\n            var draggableAreaLengthPx = _methods.getSliderWidthPx.call($this) - $this.data('left_grip_width');\r\n\r\n            //\r\n            // Validate & Move\r\n            //\r\n            if (nextRightGripPositionPx <= draggableAreaLengthPx &&\r\n                nextLeftGripPositionPx >= 0 &&\r\n                nextLeftGripPositionPx <= draggableAreaLengthPx &&\r\n                (!$this.data('has_right_grip') || nextLeftGripPositionPx <=\r\n                nextRightGripPositionPx\r\n                // [! edit:\r\n                // subtract the grip width to let the handles stop when they touch..\r\n                - (!settings.crossable_handles ? $this.data('left_grip_width') : 0)\r\n                // end edit!]\r\n                )) {\r\n\r\n                var prevMin = $this.data('cur_min'),\r\n                    prevMax = $this.data('cur_max');\r\n\r\n                // note: also stores new cur_min, cur_max\r\n                _methods.set_position_from_px.call($this, nextLeftGripPositionPx, nextRightGripPositionPx);\r\n\r\n                // set the style of the grips according to the highlighted range\r\n                _methods.refresh_grips_style.call($this);\r\n\r\n                _methods.notify_changed_implicit.call($this, 'drag_move', prevMin, prevMax);\r\n            }\r\n\r\n            return $this;\r\n        },\r\n```\r\n\r\nOf course it would be beter if this was an additional setting, because now when not allowing to cross, it will always force the 'no touch' policy (actually a better name would be 'touch slightly only' :smile: )"}}