• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
anchor function for in page links

#1
[eluser]vertmonkee[/eluser]
At the top of my page I will have links to jump to different id's within the same page like this
Code:
<a href="#id-1">First section</a>
<a href="#id-2">Second section</a>
<a href="#id-3">Third section</a>

If I use the anchor function from codeigniter like this

Code:
&lt;?php echo anchor('#id-1', 'First section'); ?&gt;

It creates a link to the full url where as I just want it to move the page down to that id.

If I just put the regular <a> tag in it works fine.

Is there a way to do this with codeigniter or should I just stick with the HTML tags?

Thanks


Messages In This Thread
anchor function for in page links - by El Forum - 08-09-2010, 06:13 AM
anchor function for in page links - by El Forum - 08-09-2010, 06:17 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.