forked from GNUsocial/gnu-social
Using event bubbling instead of event handling thanks to Ara
Pehlivanian http://arapehlivanian.com
This commit is contained in:
parent
456f3eeb50
commit
7e0a314768
16
js/util.js
16
js/util.js
@ -203,7 +203,6 @@ $(document).ready(function(){
|
|||||||
$("#notices_primary .notices").prepend(document._importNode(li, true));
|
$("#notices_primary .notices").prepend(document._importNode(li, true));
|
||||||
$("#notices_primary .notice:first").css({display:"none"});
|
$("#notices_primary .notice:first").css({display:"none"});
|
||||||
$("#notices_primary .notice:first").fadeIn(2500);
|
$("#notices_primary .notice:first").fadeIn(2500);
|
||||||
NoticeHover();
|
|
||||||
NoticeReply();
|
NoticeReply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -221,17 +220,16 @@ $(document).ready(function(){
|
|||||||
NoticeReply();
|
NoticeReply();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function NoticeHover() {
|
function NoticeHover() {
|
||||||
$("#content .notice").hover(
|
function mouseHandler(e) {
|
||||||
function () {
|
$(e.target).closest('li.hentry')[(e.type === 'mouseover') ? 'addClass' : 'removeClass']('hover');
|
||||||
$(this).addClass('hover');
|
};
|
||||||
},
|
$('#content .notices').mouseover(mouseHandler);
|
||||||
function () {
|
$('#content .notices').mouseout(mouseHandler);
|
||||||
$(this).removeClass('hover');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function NoticeReply() {
|
function NoticeReply() {
|
||||||
if ($('#notice_data-text').length > 0) {
|
if ($('#notice_data-text').length > 0) {
|
||||||
$('#content .notice').each(function() {
|
$('#content .notice').each(function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user