Here's a snippet of code that I'm having trouble with:
this.json.each(function(obj, index) {
var li = new Element('li');
var a = new Element('a', {
'href': '#',
'rel': obj.id,
events: {
'click': function(e) {
this.doSteps(this.step + 1); // <-- causing issue
}
}
});
var img = new Element('img', {
'src': imgd + obj.img,
'alt': obj.name
});
img.inject(a);
a.inject(li);
li.inject(ul);
});
When running this code, I encounter an error message saying "this.doSteps is not a function" in the console. Any assistance and explanation on how to resolve this issue would be greatly appreciated.
Thank you very much for your help.