أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
I am done with redirection to target page but what I want is to redirect to particular <div> of the page .
You can simply use the anchor tag to point to specific section id .. eg:
First: You add this code to the section on the page you want to your link to jump to:
<a id="section1">Section1 title</a >
Second: You point your hyperlink to the id of that section preceded by a hash mark (#):
<a href="#section1">my link to section1</a >
or
if you want to link a page in site1 to a specific are in a page in site2 use:
<a href="http://www.site2.com/mypage.html#section1">Go to section1 in the2nd site</a >
Using javascript is not a good choice unless it is really needed because it will add more complexity and slow the page while there already a simple specific HTML tag.
You can do it in two ways.
1) [via Javascript (+jQuery)]
<ahref="#"id="home">home</a> $('#home').click(function(){ $(document).scrollTop(100) // any value you need });2) [via pure HTML]
<ahref="#home_section">home</a><sectionid="home_section"></section>