它显示错误
即使代码正确运行,也可以在jQuery中使用TypeError:$(...)。fancybox不是函数
。由于该错误,引导程序的其他功能无法正常工作。
<?php
$result = mysql_query ("SELECT * FROM submit_menuscript_master WHERE edit_panel=''") or die (mysql_error ());
//$info=mysql_fetch_array($result);
?>
<div class="widget-body">
<table class="table table-striped table-hover dataTable" id="sample_1">
<thead>
<tr>
<th><input type="hidden" class="group-checkable" data-set="#sample_1 .checkboxes" /></th>
<th>Sr. No</th>
<th>Author Name</th>
<th>Article Type</th>
<th>Paper Title</th>
<th>Submission Date</th>
<th> </th>
<th> </th>
<th> </th>
</tr>
</thead>
<tbody>
<?php
$i=1;
while($info=mysql_fetch_array($result))
{
$popupNm="popupDemo_".$info['id'];
$popupNm1="ab_popup".$info['id'];
?>
<tr>
<td><input type="hidden" name="check_list_<?php echo $i;?>" id="check_list_<?php echo $i;?>" class="checkboxes" value="<?php echo $info['id']?>" /></td>
<td><?php echo $i;?></td>
<td><?php echo givedata("pi_login_det","id",$info['auther_id'],"person_name");?></td>
<td><?php echo $info['type_name'];?></td> <td><a class="tooltips" data-original-title="<? echo $info['paper_title'];?>" data-placement="top" ><?php
$string= $info['paper_title'];
if(strlen($string)>=5)
$string1=substr($string,0,30);
echo $string1;
?></a></td>
<td><?=date("d-m-Y",strtotime($info['sub_date']));?></td>
<td><a href="show_absract.php?id=<?php echo $info['id']?>" class="popupCls ab_popup btn btn-info" id="<?php echo $popupNm1;?>">Info</a></td>
<script>
$("#<?php echo $popupNm1;?>").fancybox({
'width' : '80%',
'height' : '100%',
'hideOnOverlayClick' : false
});
</script>
<td><input type="hidden" id="edit_panel_<?php echo $i;?>" name="edit_panel_<?php echo $i;?>"/><a href="add_editorial_panel.php?i=<?php echo $i;?>&type_name=<?php echo $info['type_name']?>" class="popupCls btn btn-success" id="<?php echo $popupNm;?>">Panel</a>
<script>
$("#<?php echo $popupNm;?>").fancybox({
'width' : '80%',
'height' : '100%',
'hideOnOverlayClick' : false
});
</script> </td>
<td><a style="cursor:pointer;" class="btn btn-success" onclick="getPanel(<?php echo $i;?>);">Issue</a> </td>
</tr>
<?php
$i++;
}
?>
</tbody>
</table>