no iHover container div
This commit is contained in:
parent
a064101244
commit
db856d775b
@ -2445,20 +2445,15 @@
|
|||||||
};
|
};
|
||||||
imgHover = {
|
imgHover = {
|
||||||
init: function() {
|
init: function() {
|
||||||
imgHover.el = $.el('div', {
|
return g.callbacks.push(function(root) {
|
||||||
id: 'iHover'
|
var thumb;
|
||||||
|
if (!(thumb = $('img[md5]', root))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$.bind(thumb, 'mouseover', imgHover.mouseover);
|
||||||
|
$.bind(thumb, 'mousemove', ui.hover);
|
||||||
|
return $.bind(thumb, 'mouseout', imgHover.mouseout);
|
||||||
});
|
});
|
||||||
$.append(d.body, imgHover.el);
|
|
||||||
return g.callbacks.push(imgHover.node);
|
|
||||||
},
|
|
||||||
node: function(root) {
|
|
||||||
var thumb;
|
|
||||||
if (!(thumb = $('img[md5]', root))) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$.bind(thumb, 'mouseover', imgHover.mouseover);
|
|
||||||
$.bind(thumb, 'mousemove', ui.hover);
|
|
||||||
return $.bind(thumb, 'mouseout', imgHover.mouseout);
|
|
||||||
},
|
},
|
||||||
mouseover: function(e) {
|
mouseover: function(e) {
|
||||||
/*
|
/*
|
||||||
@ -2468,13 +2463,15 @@
|
|||||||
instead of manipulating src, we manipulate the entire img
|
instead of manipulating src, we manipulate the entire img
|
||||||
*/ var img;
|
*/ var img;
|
||||||
img = $.el('img', {
|
img = $.el('img', {
|
||||||
|
id: 'iHover',
|
||||||
src: this.parentNode.href
|
src: this.parentNode.href
|
||||||
});
|
});
|
||||||
$.append(imgHover.el, img);
|
imgHover.img = img;
|
||||||
return ui.el = imgHover.el;
|
ui.el = img;
|
||||||
|
return $.append(d.body, img);
|
||||||
},
|
},
|
||||||
mouseout: function(e) {
|
mouseout: function(e) {
|
||||||
return $.rm(imgHover.el.firstChild);
|
return $.rm(imgHover.img);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
imgPreloading = {
|
imgPreloading = {
|
||||||
|
|||||||
@ -1847,14 +1847,11 @@ nodeInserted = (e) ->
|
|||||||
|
|
||||||
imgHover =
|
imgHover =
|
||||||
init: ->
|
init: ->
|
||||||
imgHover.el = $.el 'div', id: 'iHover'
|
g.callbacks.push (root) ->
|
||||||
$.append d.body, imgHover.el
|
return unless thumb = $ 'img[md5]', root
|
||||||
g.callbacks.push imgHover.node
|
$.bind thumb, 'mouseover', imgHover.mouseover
|
||||||
node: (root) ->
|
$.bind thumb, 'mousemove', ui.hover
|
||||||
return unless thumb = $ 'img[md5]', root
|
$.bind thumb, 'mouseout', imgHover.mouseout
|
||||||
$.bind thumb, 'mouseover', imgHover.mouseover
|
|
||||||
$.bind thumb, 'mousemove', ui.hover
|
|
||||||
$.bind thumb, 'mouseout', imgHover.mouseout
|
|
||||||
mouseover: (e) ->
|
mouseover: (e) ->
|
||||||
###
|
###
|
||||||
http://code.google.com/p/chromium/issues/detail?id=36142
|
http://code.google.com/p/chromium/issues/detail?id=36142
|
||||||
@ -1862,11 +1859,14 @@ imgHover =
|
|||||||
|
|
||||||
instead of manipulating src, we manipulate the entire img
|
instead of manipulating src, we manipulate the entire img
|
||||||
###
|
###
|
||||||
img = $.el 'img', src: @parentNode.href
|
img = $.el 'img'
|
||||||
$.append imgHover.el, img
|
id: 'iHover'
|
||||||
ui.el = imgHover.el
|
src: @parentNode.href
|
||||||
|
imgHover.img = img
|
||||||
|
ui.el = img
|
||||||
|
$.append d.body, img
|
||||||
mouseout: (e) ->
|
mouseout: (e) ->
|
||||||
$.rm imgHover.el.firstChild
|
$.rm imgHover.img
|
||||||
|
|
||||||
imgPreloading =
|
imgPreloading =
|
||||||
init: ->
|
init: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user