Is there a Moo tool that can replace multiple element IDs?
I currently have the following code:
$$('myelement').each(function(el){
var get_all_labels = el.getElements('label');
var get_label_id = get_all_labels.getProperty('id');
el.addClass(get_label_id);
});
However, my labels (labael_name) return an additional suffix like -elem,,, and I need to remove -elem,, from the new parent class name created. I tried using `replace` but it returned an error saying that `replace` is not a function. I also attempted custom string replacement for JavaScript, but I'm not having any success with it. Any hints or suggestions would be greatly appreciated. Thank you!