JQuery Automatic Scrolling --> Need help
Hello,
My name is Marcel and I need your help.
My code automatic creating a list by all <h1> tags in my html file.
Now i want to scroll to my <h1> tags when im clicking the specific element in my list.
But i dont know how to do this.
Maybe you guys have a hint for me how to do this or maybe can create me the code so i can look at it and realize how this is working?
Thx!
- $(document).ready(function(){
- $('h1').each(function( index ) {
- console.log( index + ": " + $(this).text() );
- $(".Sammlung > ul").append("<li>" + $(this).text() + "</li>");
- });
- });