Ali0Boy
دوشنبه 17 بهمن 1390, 20:41 عصر
باسلام دوستان من در حال ساخت یک آلبوم عکس هستم ولی نمی خواهم از نرم افزار های آماده استفاده کنم و می خواهم خودم بوسیله ی JQuery بنویسم. این کد زیر است:
<html>
<head>
<script type="text/javascript" src="min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('a').mouseover(function () {
$(this).next('div.info').slideDown('slow');
})
$('a').mouseout(function () {
$(this).next('div.info').slideUp('slow');
});
});
$(document).ready(function () {
$(".img2").click(function () {
$("#showD1").attr("src", $(this).attr("src"));
$("#showTitle").attr("Text", $(this).attr("title"));
});
});
</script>
<style>
ul {
list-style:none;
margin:0;
padding:0;
}
ul li {
padding:3px;
background:#EEE;
border:1px solid #000000;
width:200px;
margin:2px;
}
.info {
padding:5px;
background:#FFF;
color:#000;
display:none;
}
.img2
{
border:#000 1px solid;
}
</style>
</head>
<body>
<img class="img2" src="img/a1.jpg" title="iran" width="100" height="100" />
<img id="showD1" width="500" height="500" /><br />
<asp:Label ID="showTitle" runat="server" Text="Show Title"></asp:Label><br />
</body>
</html>
مقدار تصویر در تصویر با id=showD1 نمایش داده می شود اما title آن در لیبل نمایش داده نمی شود؟
چه کنم؟ راهنمایی؟
<html>
<head>
<script type="text/javascript" src="min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('a').mouseover(function () {
$(this).next('div.info').slideDown('slow');
})
$('a').mouseout(function () {
$(this).next('div.info').slideUp('slow');
});
});
$(document).ready(function () {
$(".img2").click(function () {
$("#showD1").attr("src", $(this).attr("src"));
$("#showTitle").attr("Text", $(this).attr("title"));
});
});
</script>
<style>
ul {
list-style:none;
margin:0;
padding:0;
}
ul li {
padding:3px;
background:#EEE;
border:1px solid #000000;
width:200px;
margin:2px;
}
.info {
padding:5px;
background:#FFF;
color:#000;
display:none;
}
.img2
{
border:#000 1px solid;
}
</style>
</head>
<body>
<img class="img2" src="img/a1.jpg" title="iran" width="100" height="100" />
<img id="showD1" width="500" height="500" /><br />
<asp:Label ID="showTitle" runat="server" Text="Show Title"></asp:Label><br />
</body>
</html>
مقدار تصویر در تصویر با id=showD1 نمایش داده می شود اما title آن در لیبل نمایش داده نمی شود؟
چه کنم؟ راهنمایی؟