I want to initiate the jquery-function "init" with an Object.The Object is predefined like
name={a:'d',b:'e',c:'f'}
. The name of the Object is the html-id from the svg-rect-Object I clicked.
This is what I have. The Problem is, that "nameofrect" when called gives back a String not the Object. What can I do?
$(document).on('click', '.some-svg-rect', function () {
var nameofrect = ((this.id).slice(1)).toLowerCase(); `//normal id = 'r'+somename`
init(nameofrect);
});