here's the code. thanks
sorry my coding is kinda mess.
Code:
<body>
<script type="text/javascript" language="JavaScript"><!--
function DoReadMore(tid1,tid2,tid3) {
document.getElementById(tid1).style.display = "none";
document.getElementById(tid2).style.display = "";
document.getElementById(tid3).style.display = "";
$(document).ready(function() {
$('#DoReadMore').click(function() {
$('td:nth-child(1)').hide();
});
});
}
function AbandonReadMore(tid1,tid2,tid3) {
document.getElementById(tid1).style.display = "none";
document.getElementById(tid2).style.display = "none";
document.getElementById(tid3).style.display = "";
$(document).ready(function() {
$('#AbandonReadMore').click(function() {
$('td:nth-child(0)').hide();
});
});
}
//--></script>
<table width="629" border="0" cellpadding="10" cellspacing="0" bgcolor="#FFFFFF" style="border-top: 1px solid #DCDDDD;">
<tr>
<td>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tbody>
<tr>
<td style="padding-top: 15px; padding-bottom: 3px;"><strong>Scholarship Available</strong></td>
</tr>
<tr>
<td> <ul>
<li>Biasiswa Sukan Persekutuan <span id="sukan"
onclick="DoReadMore('sukan','sukan1','sukan2');"
style = "font-weight: bold;
font-size: small;
color: red;" value="Hide Column 1">
<nobr>[Read More]</nobr></span></li>
<div id="sukan2"
style="display: none;">
// some info bout the scholar
</div>
<span
id="sukan1"
onclick="AbandonReadMore('sukan1','sukan2','sukan');"
style="display: none;
font-weight: bold;
font-size: small;
color: red;">
<nobr>[Read Less]</nobr></span>
</ul>
</td>
<td>
<ul><li>Bank Negara Malaysia Scholarship Award <span id="bank"
onclick="DoReadMore('bank','bank1','bank2');"
style = "font-weight: bold;
font-size: small;
color: red;" value="Hide Column 0">
<nobr>[Read More]</nobr></span></li>
<div id="bank2"
style="display: none;">
// some info bout the scholar
</div>
<span id="bank1"
onclick="AbandonReadMore('bank1','bank2','bank');"
style="display: none;
font-weight: bold;
font-size: small;
color: red;">
<nobr>[Read Less]</nobr></span>
</ul>
</td>
</tr>
// second row
<tr>
<td> <ul>
<li>British American Tobacco <span id="british"
onclick="DoReadMore('british','british1','british2');"
style = "font-weight: bold;
font-size: small;
color: red;" >
<nobr>[Read More]</nobr></span></li>
<div id="british2"
style="display: none;">
// some info bout the scholar
</div>
<span id="british1"
onclick="AbandonReadMore('british1','british2','british');"
style="display: none;
font-weight: bold;
font-size: small;
color: red;">
<nobr>[Read Less]</nobr></span>
</ul>
</td>
<td> <ul>
<li>Canon Scholarship Award <span id="canon"
onclick="DoReadMore('canon','canon1','canon2');"
style = "font-weight: bold;
font-size: small;
color: red;" >
<nobr>[Read More]</nobr></span></li>
<div id="canon2"
style="display: none;">
// some info bout the scholar
</div>
<span id="canon1"
onclick="AbandonReadMore('canon1','canon2','canon');"
style="display: none;
font-weight: bold;
font-size: small;
color: red;">
<nobr>[Read Less]</nobr></span>
</ul>
</td>
</tr>
</tbody>
</table>
</table>
</body>
</html>
Bookmarks