Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write a link like <a href="#id"> which link to the same page in PHP?

Tags:

php

like in HTML, I could write <a href="#id"> which could link to the place where I make a <a id="id"> . but it seems that it does not work in PHP. How to do that?

the original code is from bootstrap http://twitter.github.com/bootstrap/components.html#navs

<div class='tabbable'>
<ul class='nav nav-tabs'>
    <li class='active'><a href='#tab1' data-toggle='tab'>Drinks</a></li>
    <li><a href='#tab2' data-toggle='tab'>Bread</a></li>
</ul>

<div class='tab-content'>
    <div class='tab-pane active' id='tab1'><p>some</p>
    </div>

    <div class='tab-pane' id='tab2'><p>many</p>
    </div>
</div>

but just when I turned to PHP, the tab link does not work

like image 302
user1888625 Avatar asked Dec 05 '22 11:12

user1888625


1 Answers

Edit:

Are you trying to do sth like this? See: http://twitter.github.com/bootstrap/javascript.html#tabs


See the working example: http://jsfiddle.net/U6aKT/

<a href="#id">go to id</a>
<div style="margin-top:2000px;"></div>
<a id="id">id</a>
like image 139
mstfdrmz Avatar answered Dec 09 '22 15:12

mstfdrmz