From 38a26cd73916afbca0b6219c8fa9e6af1054f6a5 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Wed, 18 May 2016 15:30:44 +0200 Subject: [PATCH] Now the custom title used in pandora uses event delegation, so won't be necessary to bind the event to new elements --- pandora_console/include/javascript/jquery.pandora.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/javascript/jquery.pandora.js b/pandora_console/include/javascript/jquery.pandora.js index b9df7f716f..9d9639a4b0 100644 --- a/pandora_console/include/javascript/jquery.pandora.js +++ b/pandora_console/include/javascript/jquery.pandora.js @@ -160,7 +160,7 @@ $(document).ready (function () { function forced_title_callback() { // Forced title code - $('.forced_title').hover(function() { + $('body').on('mouseenter', '.forced_title', function() { /////////////////////////////////////////// // Put the layer in the left-top corner to fill it /////////////////////////////////////////// @@ -233,8 +233,8 @@ function forced_title_callback() { $('#forced_title_layer').css('left', layer_left); $('#forced_title_layer').css('top', layer_top); $('#forced_title_layer').show(); - }, - function () { + }); + $('body').on('mouseout', '.forced_title', function () { $('#forced_title_layer').hide().empty(); }); }