Welcome Guest, Not a member yet? Register   Sign In
How to make hashtag work?
#1

The hashtags #profile for example is not working in codeigniter.

My view:
Code:
<ul class="nav nav-tabs">
        <li class="active"><a href="#profile" data-toggle="tab" aria-expanded="true">User</a></li>
        <li class=""><a href="#edit-profile" data-toggle="tab" aria-expanded="false">Edit User</a></li>
        <li class=""><a href="#my-posts" data-toggle="tab" aria-expanded="false">Entries</a></li>
    </ul>

    <div class="tab-content">
        <div class="tab-pane fade active in" id="profile">
            ///mystuffhere
       </div>
       <div class="tab-pane fade" id="edit-profile'>
            ///mystuffhere
       </div>
       <div class="tab-pane fade" id="my-posts'>
           ///mystuffhere
       </div>
However, I have a pagination feature which doesn't let me use the href feature very well. I have no idea how to put #profile after the url because the url is something like http://localhost/admin/page/. Since there are no .html, php extentions, I don't know how to do it. I can't put it like http://localhost/admin/page/#profile or http://localhost/admin/page#profile/ either. Please help. Thanks
Reply
#2

(03-11-2015, 02:49 PM)Taylor Wrote: The hashtags #profile for example is not working in codeigniter.

Before jumping to that conclusion, I suggest you go over these questions.

1. Does your view reference the bootstrap.min.css ?
2. Does your view reference the jquery-x-x-x.min.js ?
3. Does your view reference the bootstrap.min.js ?

Provide valid references to the 3 files and your view is good to go.

Now, for the part of CodeIgniter, looking at this snippet ...
Code:
<div class="tab-pane fade active in" id="profile">
            ///mystuffhere
</div>

Replace the ///mystuffhere with:
Code:
<?php $this->load->view("your/partial/view/here") ?>

I hope this helps. And keep on coding Smile
Share what you know,
Learn what you don't
Reply




Theme © iAndrew 2016 - Forum software by © MyBB