Refit original button nav creation code into a function.

Further explanation on what is done and also noting that .one() is
unsuitable for this function.