這是我的代碼:如何添加自定義的JS功能笨錨,而使用表庫
foreach($patients as $patient) {
$this->table->add_row(++$i,
$patient->opd_no,
$patient->sname.', '.$patient->fname.' '.$patient->mname,
strtoupper($patient->gender),
date('M d, Y', strtotime($patient->birth_date)),
$patient->address_no.' '.$patient->address_st.' '.$patient->address_brgy.' '.$patient->address_local.' '.$patient->address_province,
anchor('consultation/queue/'.$patient->pk_id, 'Initial', ar
ray('class' => 'queue'))
);
我想它在錨補充。
編輯: 行,所以我加入這個希望這將是一個解決辦法:
anchor('#'.$patient->pk_id, 'Initial', array('class' => 'queue', 'rel' => 'ic'))
,並通過jQuery使用rel屬性來調用一個函數試過。事情是這樣的:
$('a[rel=ic]').click(function() {});
但隨後一個笨錯誤頁面顯示出來說
你是在尋找正在 笨動態生成的頁面。