Skip to content Skip to sidebar Skip to footer

How To Link To A Specific Part In The Same Page With Jquery And Php?

I know to link to a part in the same page like : A Here is A But when I designed it with jquery and php, ı have a proble

Solution 1:

Don't have the time to see all your code, but can't use a scrollTop() method ?
See here.


Solution 2:

To scroll with jQuery to a specific ID in your page, use

$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');

Solution 3:

You can specify an anchor in your url as well.

<a href="your-page.html#k" />

When you click the link you will be taken to that page and the document will scroll automatically to the position of <a name="k">


Post a Comment for "How To Link To A Specific Part In The Same Page With Jquery And Php?"