How to select current page elements id or class in framework7?

When trying to select an element by its iID or CLASS in the index page with

var $$ = Dom7
$$("#someid")

there is no issue, but if that element exist in another page it doesn’t work, I understand that framework7 adds a current-page class to currently displayed page , is there a way to select elements in the current page only or is there a way to select element in all pages?