Target Custom Buttons on Master Page

Anyone know a way to target customer buttons that are on the master page? I have a back and next button that I need to mask until the content on the slide has been visited/viewed. (I can use a variable on the slide content itself to say it has been seen, but how to target the master page items is what I can’t seem to figure out.)