modified plugin for work only with multiple elements