dimanche 19 avril 2015

Page is Jumping back to Top after targeting the anchor tag

Hello guys im using wordpress and i need to jump to the comments when the user is clicking a link. The single.php is opening in a new tab and its loading the page on the anchor (comment-id) but after that its always jumping back to the top of the page.


I guess it could be a problem with javascript but im not sure and im not sure where to find it in wordpress single.php. Has anyone an idea how to prevent the page jumping back to the top after loading. So that i can stay at the comment after clicking the link on a different page?


this is the target <a name="comment'.$comment_ID.'" href="#comment'.$comment_ID.'" onclick="deletco('.$comment_ID.')">DELETE</a>


and this is the link form the other page to the target on single.php



<a href="'.$commpostlink.'#comment-'.$commentid.'" target="_blank">'.$titlecomm.'</a>


thanks for any help


Aucun commentaire:

Enregistrer un commentaire