Minor optimization to only bind an hover event to the notice at hand.
This commit is contained in:
parent
385fb94723
commit
2e258454f3
10
js/util.js
10
js/util.js
@ -432,11 +432,12 @@ var SN = { // StatusNet
|
||||
return false;
|
||||
});
|
||||
|
||||
if ($('#shownotice').length == 0) {
|
||||
var t;
|
||||
$("body:not(#shownotice) .notice a.thumbnail").hover(
|
||||
notice.find('a.thumbnail').hover(
|
||||
function() {
|
||||
var anchor = $(this);
|
||||
$("a.thumbnail").children('img').hide();
|
||||
$('a.thumbnail').children('img').hide();
|
||||
anchor.closest(".entry-title").addClass('ov');
|
||||
|
||||
if (anchor.children('img').length === 0) {
|
||||
@ -452,10 +453,11 @@ var SN = { // StatusNet
|
||||
},
|
||||
function() {
|
||||
clearTimeout(t);
|
||||
$("a.thumbnail").children('img').hide();
|
||||
$(this).closest(".entry-title").removeClass('ov');
|
||||
$('a.thumbnail').children('img').hide();
|
||||
$(this).closest('.entry-title').removeClass('ov');
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
NoticeDataAttach: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user