Dropdown category selector not working in mobile version

If categories do not contain any subcategory in the mobile version when we try to click on any category item it is just color changing and not showing anything.

forum thread:
http://forums.osclass.org/bender/not-working-while-clicking-on-the-category-in-mobile-version/

js solution provided by cartagena68