• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use anchor() to reference an anchor specified by an ID

#1
Suppose I have on a page somewhere the statement
Code:
<p id="AnchorOnPage">

How do I use the function anchor(...) or any other one to reference the paragraph (including parameters for the controller)?

is this in general possible using CodeIgniter?
Reply

#2
Use anchor with uri = '#AnchorOnPage'

Or use a with href="#AnchorOnPage"

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply

#3
Like this:

Code:
<!-- Goes to here when clicked. -->
<a name="AnchorOnPage"></a>

<!-- Click will goto the above -->
<a href="#AnchorOnPage">Click Me</a>
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#4
(10-01-2020, 05:44 AM)nc03061981 Wrote: Use anchor with uri = '#AnchorOnPage'

Or use a with href="#AnchorOnPage"

I would need something like

Code:
uri="aPage/#anchorOnPage/parameter1/parameter2"
Is this guaranteed to work?
Reply

#5
No that will not work, it will not take parameters.

What you want would have to be done using JavaScript or jQuery.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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