Why i'm getting this error while using `beforein` event?

I’m using page event beforein in app.js as following

import $ from 'dom7';
$(document).on("page:beforein", ".page[data-name='mviewer']", function (e, page) {
    TranslationManager.viewer(page);
});

I’m getting this error,

Uncaught TypeError: (intermediate value)(...).on is not a function

i need to see the line before
$(document)

probably:
;$(document)
will fix it