diff options
author | ghi <dokuwiki@imz.re> | 2015-02-17 11:08:15 +0100 |
---|---|---|
committer | ghi <dokuwiki@imz.re> | 2015-02-17 11:08:15 +0100 |
commit | 7d0b7e5ed7aa0f9c56def8f6c9866aa4fc8315b8 (patch) | |
tree | 08330b0a548a402caeb02ee7a185e745386ad45d /lib/scripts/behaviour.js | |
parent | d6dc28be40fb3202a3df69458db164e20999ac2b (diff) | |
parent | f8803275a58a05b29e4029cc539a6f8c60ad2ea5 (diff) | |
download | rpg-7d0b7e5ed7aa0f9c56def8f6c9866aa4fc8315b8.tar.gz rpg-7d0b7e5ed7aa0f9c56def8f6c9866aa4fc8315b8.tar.bz2 |
Merge https://github.com/splitbrain/dokuwiki into html_showrev_output
Diffstat (limited to 'lib/scripts/behaviour.js')
-rw-r--r-- | lib/scripts/behaviour.js | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index 85ddf503e..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); } ); }, @@ -109,7 +116,7 @@ var dw_behaviour = { * @author Michael Klier <chi@chimeric.de> */ checkWindowsShares: function() { - if(!LANG.nosmblinks || typeof(document.all) !== 'undefined') { + if(!LANG.nosmblinks || navigator.userAgent.match(/(Trident|MSIE)/)) { // No warning requested or none necessary return; } |