navigation: use the right selector
navigation: fix querying logic

Apparently webkit doesn't allow using querySelector from another
variable.