summaryrefslogtreecommitdiff
path: root/lib/scripts
diff options
context:
space:
mode:
authorGerry Weißbach <gerry.w@gammaproduction.de>2014-12-22 10:40:15 +0100
committerGerry Weißbach <gerry.w@gammaproduction.de>2014-12-22 10:40:15 +0100
commitfc30ac3acbd4e17e25955ccdd0c5539ee2c9beca (patch)
tree3d287ae466500a6072b84d14ff4911fa936d1479 /lib/scripts
parentde4634ec87b1a277c1686990d993dafc43db05ed (diff)
parent8da2ebf4f4261eb8f54df5704b5d9af283b5402d (diff)
downloadrpg-fc30ac3acbd4e17e25955ccdd0c5539ee2c9beca.tar.gz
rpg-fc30ac3acbd4e17e25955ccdd0c5539ee2c9beca.tar.bz2
Merge branch 'master' into new_css.php
Diffstat (limited to 'lib/scripts')
-rw-r--r--lib/scripts/behaviour.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
index 6b46add07..fb61f6e48 100644
--- a/lib/scripts/behaviour.js
+++ b/lib/scripts/behaviour.js
@@ -56,6 +56,8 @@ var dw_behaviour = {
jQuery(document).on('click','#page__revisions input[type=checkbox]',
dw_behaviour.revisionBoxHandler
);
+
+ jQuery('.bounce').effect('bounce', {times:10}, 2000 );
},
/**
@@ -64,7 +66,14 @@ var dw_behaviour = {
scrollToMarker: function(){
var $obj = jQuery('#scroll__here');
if($obj.length) {
- $obj[0].scrollIntoView();
+ if($obj.offset().top != 0) {
+ jQuery('html, body').animate({
+ scrollTop: $obj.offset().top - 100
+ }, 500);
+ } else {
+ // hidden object have no offset but can still be scrolled into view
+ $obj[0].scrollIntoView();
+ }
}
},
@@ -77,13 +86,11 @@ var dw_behaviour = {
/**
* Remove all search highlighting when clicking on a highlighted term
- *
- * @FIXME would be nice to have it fade out
*/
removeHighlightOnClick: function(){
jQuery('span.search_hit').click(
function(e){
- jQuery(e.target).removeClass('search_hit');
+ jQuery(e.target).removeClass('search_hit', 1000);
}
);
},