Jquery code for one page portfolio -


i using following jquery code 1 page portfolio

<script> $(document).ready(function(){     $('nav ul li a').click(function(){         var el = $(this).attr('href');         var elwrapped = $(el);         scrolltodiv(elwrapped,140);         return false;      });      function scrolltodiv(element,navheight){           var offset = element.offset();           var offsettop = offset.top;           var totalscroll = offsettop-navheight;           $('body,html').animate({             scrolltop: totalscroll         }, 650);     } }); </script> 

link

but when page loads directly goes contact section of site instead of index section.

can tell going wrong.

you giving autofocus textarea.

<textarea type="textarea" name="message" id="message" rows=9 required autofocus /></textarea> 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -