我正在使用PHP从mySQL中检索数据并能够显示它,就像列表项中的作业标题一样。并且想要在点击时显示PopUp中的工作技能和描述。每个职称都有独特的技能和描述。求你帮帮我......
示例代码:
<?php
//including the database connection file
include_once("includes/db.php");
// Get all the data from the table
$result = mysql_query("SELECT * FROM job_posting ORDER BY id DESC") or die(mysql_error());
echo "<ul>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array($result)) {
// Print out the contents of each row into a table
echo "<li> <a href='post_resume.php?id=".base64_encode($row['id'])."'>" . $row['title'] . "</a></li>";
}
echo "<ul>";
?>
答案 0 :(得分:0)
参考:http://jqueryui.com/dialog/
在你的李里面放一个div。
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
<script>
$(function() {
$( ".dialog" ).dialog({ autoOpen: false });
});
</script>
<body>
<ul>
<li>
<div class="dialog" title="SOME TEXT">
<p>
JOB SKILLS AND DESCRIPTION
</p>
</div> </li> </ul> </body>