in this case, the img[id^=waitfor... .show() shows existing image-containers. All of them which exist.
Because there can be more than one. And this filter just shows them.
adding another rotator with your suggestion can lead to 2 or more rotators on a button.
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
.addClass('fa')
.appendTo($('button[id^=shareMenuOptions-' + ident.toString() + '] i:first-child' )).show();
} else {
- $('img[id^=waitfor-' + verb + '-' + ident.toString() + ']').show()
+ $('<img>').attr({id: 'waitfor-' + verb + '-' + ident.toString(), src: 'images/rotator.gif'})
}
}
$('button[id^=' + verb + '-' + ident.toString() + '] i:first-child').removeClass(thumbsClass);