|
|
|
ช่วยด้วย อยากทำ ซูมภาพ แบบ jqurey โดยดึงข้อมูลจากฐานข้อมูลค่ะ |
|
|
|
|
|
|
|
ลองทำแล้วค่ะแต่พอดึงรูปจากฐานข้อมูลมันไม่ได้
|
|
|
|
|
Date :
2012-07-30 08:57:41 |
By :
เด็ก |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณค่ะ
|
|
|
|
|
Date :
2012-07-30 09:20:09 |
By :
เด็ก |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
อัพรูป ลงฐานข้อมูลได้แล้ว เรียกมาแสดงได้แล้ว แต่ติดตรงจะให้มันซูมค่ะ โหลด code zoom มาจากเว็บน่ะค่ะ
|
|
|
|
|
Date :
2012-07-30 09:22:28 |
By :
เด็ก |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<? include("imags_fruniture/media/include/connectd1b.php")?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="jquery-1.6.js" type="text/javascript"></script>
<script src="jquery.jqzoom-core.js" type="text/javascript"></script>
<link rel="stylesheet" href="jquery.jqzoom.css" type="text/css">
<style type"text/css">
body{margin:0px;padding:0px;font-family:Arial;}
a img,:link img,:visited img { border: none; }
table { border-collapse: collapse; border-spacing: 0; }
:focus { outline: none; }
*{margin:0;padding:0;}
p, blockquote, dd, dt{margin:0 0 8px 0;line-height:1.5em;}
fieldset {padding:0px;padding-left:7px;padding-right:7px;padding-bottom:7px;}
fieldset legend{margin-left:15px;padding-left:3px;padding-right:3px;color:#333;}
dl dd{margin:0px;}
dl dt{}
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden;}
.clearfix{display:block;zoom:1}
#thumblist{
width:500px;
height:50px;
margin: 0;
padding: 0;
display:block;
}
#thumblist ul {
list-style: none;
margin-right:20px;: 0;
padding: 0;
}
#thumblist ul li {
display: inline;
margin: 0px;
}
#thumblist ul li a {
display: block;
float: left;
border:1px solid #ccc;
}
#thumblist ul li a.zoomThumbActive{
border:1px solid red;
}
.jqzoom{
text-decoration:none;
float:left;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('.jqzoom').jqzoom({
zoomType: 'innerzoom',
preloadImages: false,
alwaysOn:false
});
});
</script>
</head>
<body>
<div class="clearfix" id="content" style="margin-top:100px;margin-left:350px; height:500px;width:500px;" >
<div class="clearfix">
<?
$strSQL = "SELECT * FROM besta where Product_ID='CB-001'";
$objQuery = mysql_query($strSQL);
while($row= mysql_fetch_array($objQuery)){
//echo $row["Pic"];
?>
<a href="<?=$row["Pic"]; ?>" class="jqzoom" rel='gal1' title="triumph" >
<img src="<?=$row["Pic"]; ?>" title="triumph" style="border: 4px solid #666; width:308px; height:247px;">
</a>
</div>
<div id="thumblist">
<ul>
<li><a class="zoomThumbActive" href='javascript:void(0);' rel="{gallery: 'gal1', smallimage: '../imgProd/CB-001_small 1.jpg',largeimage: '../<?=$row["Pic"]; ?>'}"><img src='<?=$row["Pic"]; ?>' style="width:116px; height:93px;"></a></li>
<li><a class="zoomThumbActive" href='javascript:void(0);' rel="{gallery: 'gal1', smallimage: './imgProd/CB-001_small 1.jpg',largeimage: './<?=$row["Pic2"]; ?>'}"><img src='<?=$row["Pic2"]; ?>' style="width:116px; height:93px;"></a></li>
</ul>
</div>
<? }?>
</body>
</html>
อันนี้เป็น ส่วนเรียกข้อมูลมาแสดง
|
|
|
|
|
Date :
2012-07-30 09:25:02 |
By :
เด็ก |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ไม่มีใครตอบเลยค่ะ
|
|
|
|
|
Date :
2012-07-30 16:43:51 |
By :
เด็ก |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|