Hello Alex,
Could you please clarify, on what event you is this code hung?
Are you sure that this is right?
pre$(this).index()/pre
Hello Alex,
Could you please clarify, on what event you is this code hung?
Are you sure that this is right?
pre$(this).index()/pre
Hi Alex,
Did you manage to find what was the issue with
"$(this).index()" ? I experience the same issue (when I manually put number instead of this code it works)
Maybe some recent update disallows "$(this).index()"?
Hi Alex and Łukasz,
$(this).index() code returns current position of the element in the parent relatively to the siblings.
So "this" should be element of the list(you can use "console.log(this)" to see what is element you have. I guess is: "this" is not a root element of the list or table(don't know what you use). So you should modify this code to get from "this" - root of you list-item or table item.
For example for list-item component click it should be:
pre
var index = jQuery(this).closest("li").index();
//Debug message.
alert("itemIndex = " + index);
//Index using.
//Apperyio.storage.musical_instruments.get()[index];
/pre
Regards.
Thank you Yurii for prompt response! It works fine now
thanks Alex!