מדיה ויקי:Gadget-ondemand-Imagemap-Highlight.js: הבדלים בין גרסאות בדף

מ שוחזר מעריכות של קיפודנחש (שיחה) לעריכה האחרונה של Jon (WMF)
 
(6 גרסאות ביניים של 2 משתמשים אינן מוצגות)
שורה 114: שורה 114:
var someli; // select arbitrary one
var someli; // select arbitrary one
$('area', map).each(function() {
$('area', map).each(function() {
var text = this.title;
var text = mw.html.escape(this.title);
var li = lis[text]; // title already met? use the same li
var li = lis[text]; // title already met? use the same li
if (!li) { //no? create a new one.
if (!li) { //no? create a new one.
שורה 127: שורה 127:
li.data('areas').push(this); //add the area to the li
li.data('areas').push(this); //add the area to the li
someli = li; // whichever - we just want one...
someli = li; // whichever - we just want one...
$(this).on('mouseover mouseout', function(e) {li.trigger(e);});
$(this).on('mouseover mouseout',  
function(e) {
li.trigger(e.type);
});
});
});
if (someli) someli.trigger('mouseout');
if (someli) someli.trigger('mouseout');