Hi,
I am creating a small page with the help of jquery , What I want is when I click on shortdesc TR class, only the corresponding fulldesc ** TR class should be visible. Currently Its showing all the **fulldesc TR clasees. Please help me to solve this.
Following is my code:
<html>
<head>
<title>Demo</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<SCRIPT type="text/javascript">
$(document).ready(function(){
$(".shortdesc").click(function(){
$(".fulldesc").toggle("slow");
});
});
</SCRIPT>
<style type="text/css">
.shortdesc{ color:red;}
.fulldesc{ color:green; display:none;}
</style>
</head>
<body>
<table>
<?php
for($count=1; $count<=10; $count++)
{?>
<tr class="shortdesc"><td><?=$count?> Short description</td></tr>
<tr class="fulldesc"><td>My Name is <?=$count?> and this is full description </td></tr>
<?php
}
?>
</table>
</body>
</html>