简体   繁体   中英

Twitter Bootstrap Tooltips

I have the following code that is dynamically created on the server side:

foreach($pages as $key => $value)
{   
$link = path_get($value['tid'], $value['nid']) ;
$pages[$key]['title'] = "<a href='".$link."' target='blank'>".$value['title'].($value['nid']==1?' (Accueil)':'')."</a>" ;
$pages[$key]['date_post'] = sql_to_datetime($value['date_post']) ;

$edit = "<a href='".url()."admin/page/edit/a/nid/".$value['nid']."' data-toggle='tooltip' title data-original-title='Default tooltip' >".IMG_EDIT."</a> " ; 
$delete = "<a href='".url()."admin/page/index/a/action/delete/nid/".$value['nid']."' data-toggle='tooltip' title data-original-title='Default tooltip' class='delete-element'>".IMG_DELETE."</a> " ; 

$pages[$key]['actions'] = $edit.(user_has_access_menu("page.delete")?$delete:'') ;
}

I would like to show a tooltip for each edit and delete button, but it doesn't display anything.please help

Thanks

首先,您应该使用title =“ blabla”,工具提示功能将生成data-original-title。

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