Team:Cooper Union/script/notebookScript
From 2014.igem.org
(Difference between revisions)
(Created page with " $(document).ready(function () { function InitCooperUnionNotebook() { var dateLinks = new Array(); var isFirst = true; $('h3').each...") |
|||
Line 7: | Line 7: | ||
dateLinks.push(value); | dateLinks.push(value); | ||
$(this).append('<a name="date_' + value.replace('/', '').replace('\\', '') + '"></a>'); | $(this).append('<a name="date_' + value.replace('/', '').replace('\\', '') + '"></a>'); | ||
- | $(this).append(' <a href="#top" class="back-to-top-button">back to top</a>'); | + | $(this).append(' <a href="#top" class="back-to-top-button">[^] back to top</a>'); |
}); | }); | ||
var nav = $('.notebook-navigation'); | var nav = $('.notebook-navigation'); |
Revision as of 01:48, 16 October 2014
$(document).ready(function () { function InitCooperUnionNotebook() { var dateLinks = new Array(); var isFirst = true; $('h3').each(function () { var value = $(this).text(); dateLinks.push(value); $(this).append('<a name="date_' + value.replace('/', ).replace('\\', ) + '"></a>'); $(this).append(' <a href="#top" class="back-to-top-button">[^] back to top</a>'); }); var nav = $('.notebook-navigation'); for (var i = 0; i < dateLinks.length; i++) { var day = dateLinks[i].substring(dateLinks[i].indexOf('/') + 1); day = day.substring(0, day.indexOf('/')); nav.append(' <a href="#date_' + dateLinks[i].replace('/', ).replace('\\', ) + '">' + day + '</a>'); } } InitCooperUnionNotebook(); });