简体   繁体   中英

Codeigniter div tag around anchor

can we use div tag inside anchor function?

I have this div

#first{ opacity:0; }

Then I want to put it into my anchor. Here it is:

<?php

    if(is_array($databuku)){

        echo '<ol><br>';
        $i = 1;
        foreach($databuku as $key){
            $judul = '<div id="draggable'.$i++.'" class="ui-widget-content"><center><strong>'.$key->tbl_name.'</strong>
                         <br> <br>
                         <a href="hall_a.html">' .$key->index_no. ' / ' .$key->id. '</a>
                         <br>
                         '.anchor('perpustakaan/koreksi_buku/'.$key->id, 'Edit').' |

                         // I want to put the div #first in 'Delete' function below // 
                         '.anchor('perpustakaan/konfirm_hapus_buku/'.$key->id, 'Delete').'

                         </center></div>';
             echo $judul;
        }
        echo '</ol>';
    }

?>

I want to put the div #first in anchor -> delete. How can I do that?

这会起作用

 anchor('perpustakaan/konfirm_hapus_buku/'.$key->id, '<div id="first">Delete</div>')

由于CSS div的不透明度为0,因此div内容对您不可见,如果您想在锚标记中首先添加div#,请尝试,

...anchor('perpustakaan/konfirm_hapus_buku/'.$key->id, '<div id="first"></div>Delete')....

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM