diff --git a/dashboard-ui/scripts/nowplayingpage.js b/dashboard-ui/scripts/nowplayingpage.js index ba06502209..c0174edace 100644 --- a/dashboard-ui/scripts/nowplayingpage.js +++ b/dashboard-ui/scripts/nowplayingpage.js @@ -740,7 +740,7 @@ }); } - $(document).on('pageinit', "#nowPlayingPage", function () { + pageIdOn('pageinit', "nowPlayingPage", function () { var page = this; @@ -768,7 +768,8 @@ updateCastIcon(page); }); - }).on('pagebeforeshow', "#nowPlayingPage", function () { + }); + pageIdOn('pagebeforeshow', "nowPlayingPage", function () { $(document.body).addClass('hiddenViewMenuBar').addClass('hiddenNowPlayingBar'); var page = this; @@ -787,7 +788,8 @@ updateCastIcon(page); - }).on('pagebeforehide', "#nowPlayingPage", function () { + }); + pageIdOn('pagebeforehide', "nowPlayingPage", function () { releaseCurrentPlayer();