Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>for the time delay, when i understand you well, try something like:</p> <pre><code>var tmp = $.fn.scrollspy.Constructor.prototype.process; $.fn.scrollspy.Constructor.prototype.process = function () { console.log('ff wachten') var that = this; setTimeout(function(){tmp.call(that)},5000); } </code></pre> <p>Add this after the inclusing of scrollspy.js. But ou also will have to add a delay on the click event it self like: (from: <a href="http://www.jquery4u.com/jquery-functions/delay-sleep-pause-wait/" rel="nofollow">http://www.jquery4u.com/jquery-functions/delay-sleep-pause-wait/</a>)</p> <pre><code>function sleep(milliseconds) { var start = new Date().getTime(); for (var i = 0; i &lt; 1e7; i++) { if ((new Date().getTime() - start) &gt; milliseconds){ break; } } } $('.navbar-nav a').click(function(){sleep(5000); console.log('slept'); return true;}); </code></pre> <p>Now you got a double delay, so make a combination:</p> <pre><code>var tmp = $.fn.scrollspy.Constructor.prototype.process; var delay = 5000 //ms $.fn.scrollspy.Constructor.prototype.process = function () { console.log('ff wachten') var that = this; setTimeout(function(){tmp.call(that)},delay); delay=5000; } function sleep(milliseconds) { var start = new Date().getTime(); for (var i = 0; i &lt; 1e7; i++) { if ((new Date().getTime() - start) &gt; milliseconds){ break; } } } </code></pre> <p><strong>2</strong></p> <blockquote> <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset="".</p> <p>Name type default description offset number 10 Pixels to offset from top when calculating position of scroll.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload