mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update events
This commit is contained in:
parent
e4e6f27f87
commit
d2d9f83bcd
3 changed files with 40 additions and 27 deletions
|
@ -2472,10 +2472,9 @@ var AppInfo = {};
|
|||
|
||||
function pageClassOn(eventName, className, fn) {
|
||||
|
||||
$(document).on(eventName, function (e) {
|
||||
document.addEventListener(eventName, function (e) {
|
||||
|
||||
var target = e.target;
|
||||
|
||||
if (target.classList.contains(className)) {
|
||||
fn.call(target, e);
|
||||
}
|
||||
|
@ -2484,10 +2483,9 @@ function pageClassOn(eventName, className, fn) {
|
|||
|
||||
function pageIdOn(eventName, id, fn) {
|
||||
|
||||
$(document).on(eventName, function (e) {
|
||||
document.addEventListener(eventName, function (e) {
|
||||
|
||||
var target = e.target;
|
||||
|
||||
if (target.id == id) {
|
||||
fn.call(target, e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue