From 64ce9ffad7343060463f3ec4e1b33f35b73e2618 Mon Sep 17 00:00:00 2001 From: Soundara Pandian Date: Sun, 20 Nov 2016 23:32:52 +0530 Subject: [PATCH] #49 - passed the control ID in the event arguments --- src/roundslider.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/roundslider.js b/src/roundslider.js index a5ae45a..ee8dec6 100644 --- a/src/roundslider.js +++ b/src/roundslider.js @@ -948,6 +948,8 @@ _raise: function (event, args) { var o = this.options, fn = o[event], val = true; args = args || { value: o.value }; + args["id"] = this.id; + args["control"] = this.control; args["options"] = o; if (fn) { args["type"] = event; @@ -957,7 +959,7 @@ val = val === false ? false : val; } } - this.control.trigger($.Event ? $.Event(event, args) : event); + this.control.trigger($.Event(event, args)); return val; }, _bind: function (element, _event, handler) { @@ -1160,6 +1162,7 @@ // The plugin constructor function RoundSlider(control, options) { if (control.id) window[control.id] = this; + this.id = control.id; this.control = $(control); // the options value holds the updated defaults value