‘Dehighlighting’ navigation once clicked

You’re removing the current menu item, and current menu page, however your CSS refers to these: .site-navigation li .current_page_item > a, .site-navigation li .current_page_ancestor > a, .site-navigation li .current-menu-item > a, .site-navigation li .current-menu-ancestor > a .current_page_ancestor and .current-menu-ancestor are not handled by your javascript, but they are styled, hence your problem. You will need … Read more

Is it a good idea to init ajax functions only while ‘DOING_AJAX’

The best way to know is to test yourself…but you will most likely find that the performance difference is negligible. Adding those actions don’t mean that the “my_ajax_method_” will be evaluated. It is just setting up a reference…and the reference is only executed if the AJAX call comes in.

admin ajax is not working for non logged in users

There are some “magic” request parameters that are better avoided, mostly anything that can be used as a parameter name at a request url but also some more like “email” (don’t think it is well documented and a quick google failed to bring a good reference). Try to change the names of your parameters especially … Read more