Fixed JS error and refactored toggler code in admin.js.php

Failure to check for #toggler was causing a JS error on admin pages
without multiple toggles. Also refactored code to 100% jQuery –
previously the code was a mixture of jQuery and pure JS.