I’m having difficulties to understand the code below taken from this page http://trevordavis.net/play/jquery-one-page-nav/ (tutorial for one page websites). Especially the .do and the Lorem ispum text in the middle of the code and also the reference to section-4. Could you shade some light on that? Many thanks
<script src="jquery.js"></script>
<script src="jquery.scrollTo.js"></script>
<script src="jquery.nav.min.js"></script>
<script>
$(document).ready(function() {
$('#nav').onePageNav();
$('.do').click(function(e) {
$('#section-4').append('<p>Lorem ipsum dolor...</p>');
e.preventDefault();
});
});
</script>
This is creating a click event handler on all elements with the class of do. When the element is clicked, a paragraph with the Lorem ipsum text will be added to the element with id section-4.