I have the following:
'.anchor('','Home').'
and I want to add the following CSS class to it:
class="top_parent"
This is so that when it's rendered in the browser, the code will look something like the following:
<a href="#" class="top_parent">Home</a>
Thanks in advance, and any help is greatly appreciated.
--
Tom
anchor('#', 'Home', array('class' => 'top_parent'));
The Codeignitor function is defined as such:
function anchor($uri = '', $title = '', $attributes = '')
I would try sending an array with a class key and value first.
These functions are found inside the \system\helpers\ folder.
You can specify an associative array of attributes for your Anchor. So, for example:
anchor('', 'Home', array('class' => 'top_parent'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With