Hi Dejan, Could you explain what this fix achieves?
On Sat, Nov 23, 2013 at 4:32 AM, Dejan Marjanovic <[email protected]> wrote: > Commit: 4b24c64d665bdcdb900ff11d38cf276fdf592986 > Author: Dejan Marjanovic <[email protected]> Sat, 23 > Nov 2013 05:32:03 +0100 > Parents: f0a599b5d062e782469e8bbde2dbf2f8db835dc4 > Branches: master > > Link: > http://git.php.net/?p=web/php.git;a=commitdiff;h=4b24c64d665bdcdb900ff11d38cf276fdf592986 > > Log: > Fix # scroll (FU docbook) > > Changed paths: > M js/common.js > M styles/theme-base.css > > > Diff: > diff --git a/js/common.js b/js/common.js > index dac7951..9195570 100755 > --- a/js/common.js > +++ b/js/common.js > @@ -1,5 +1,10 @@ > /* Plugins, etc, are on top. */ > > +String.prototype.escapeSelector = function() > +{ > + return this.replace(/(.|#)([ #;&,.+*~\':"!^$\[\]\(\)=>|\/])/g, '$1' + > '\\\\$2'); > +} > + > /** {{{ > * jQuery.ScrollTo - Easy element scrolling using jQuery. > * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | > http://flesler.blogspot.com > @@ -220,17 +225,22 @@ $(document).ready(function() { > var jHtmlBody = $('html, body'); > function scroll(target, interval) > { > - if ( ! interval && interval !== 0) > + if ( ! interval) > interval = 400; > + > + target = $('[id="' + target.substring(1) + '"]'); > > + var top = 52; > + > jHtmlBody.animate({ > - scrollTop: $(target).offset().top - 52 > + scrollTop: target.offset().top - top > }, interval); > - return false; > + > + return true; > } > > if (window.location.hash) > - scroll(window.location.hash, 0) > + scroll(window.location.hash, 1) > > $('a[href^=#]').click(function(e){ > e.preventDefault(); > diff --git a/styles/theme-base.css b/styles/theme-base.css > index 3b4f08d..de65b8f 100755 > --- a/styles/theme-base.css > +++ b/styles/theme-base.css > @@ -2333,12 +2333,14 @@ pre.info { > > > /*#layout .refsect1[id]:before,*/ > +/** > #layout *[id]:target:before { > display:block; > content:" "; > margin-top:-56px; > height:56px; > } > +*/ > > #search-results { > margin:10px 40px; > > > -- > PHP Webmaster List Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
