Cannot get the index of keyup, always get the index corresponding to the last class
is written backwards, it should be $(this).index($(".select2-input"))
$(this).index($(".select2-input"))
is written backwards, it should be
$(this).index($(".select2-input"))