I'm trying to create a clickable HTML table that doesn't make the text appear hyperlinked -- and that makes the entire table linked. After spending hours sifting through the previous posts on this topic, I thought I had figured the code out and got it to work in an HTML editor.
However, when I send myself test email samples, the code is not working. In Outlook, the table appears clickable but is not linked. In Gmail, it doesn't appear clickable and is not linked.
A very helpful commenter let me know that I can't have an <a> tag outside the table, but if I move the <a> tag to inside the <td> then it will only link the text, not the whole table.
Is there a workaround for this?
Here is my code:
<a href="http://google.com" style="text-decoration:none">
<table align="center" border="1" cellpadding="10" cellspacing="0" style="width:200px;">
<tbody>
<tr id="clickable" style="cursor:pointer">
<td style="text-align: center;"><strong>TEXT</strong></td>
<td style="text-align: center;"><strong>TEXT</strong></td>
<td style="text-align: center;"><strong>TEXT</strong></td>
</tr>
<tr id="clickable" style="cursor:pointer">
<td style="text-align: center;">
<strong><span style="color:#0c85c8;">TEXT</span>-<span style="color:#e7413D;">TEXT</span></strong>
</td>
<td style="text-align: center;">
<strong><span style="color:#0c85c8;">TEXT</span>-<span style="color:#e7413D;">TEXT</span></strong>
</td>
<td style="text-align: center;">
<strong><span style="color:#0c85c8;">TEXT</span>-<span style="color:#e7413D;">TEXT</span></strong>
</td>
</tr>
</tbody>
</table>
</a>
Thanks so much in advance
Add a style color: inherit;in your <a> tag. It should looks like this:
<a href="http://google.com" style="text-decoration:none;color:inherit">
<a href="http://google.com" style="text-decoration:none;color:inherit">
<table align="center" border="1" cellpadding="10" cellspacing="0" style="width:200px;">
<tbody>
<tr id="clickable" style="cursor:pointer">
<td style="text-align: center;"><strong>TEXT</strong></td>
<td style="text-align: center;"><strong>TEXT</strong></td>
<td style="text-align: center;"><strong>TEXT</strong></td>
</tr>
<tr id="clickable" style="cursor:pointer">
<td style="text-align: center;">
<strong><span style="color:#0c85c8;">TEXT</span>-<span style="color:#e7413D;">TEXT</span></strong>
</td>
<td style="text-align: center;">
<strong><span style="color:#0c85c8;">TEXT</span>-<span style="color:#e7413D;">TEXT</span></strong>
</td>
<td style="text-align: center;">
<strong><span style="color:#0c85c8;">TEXT</span>-<span style="color:#e7413D;">TEXT</span></strong>
</td>
</tr>
</tbody>
</table>
</a>
Related
I have a invoice design which I have replicated in html. Here is the fiddle.
The snippets of html table which I have used in the fiddle is:
<table style="width:100%;display: flex;
justify-content: center;">
<tbody style="font-size:20px;padding-left: 15%;">
<tr>
<td style="padding-bottom: 3%;text-align:right;">how many</td>
<td style="padding-bottom: 3%;padding-left: 10%;">2</td>
</tr>
<tr>
<td style="padding-bottom: 3%;text-align:right;">when:</td>
<td style="padding-bottom: 3%;padding-left: 10%;word-wrap: break-word;
width: 300px;" >March 28/18 # 7:00pm to March 30/18 # 7:00pm</td>
</tr>
<tr>
<td style="padding-bottom: 3%;text-align:right;">who:</td>
<td style="padding-bottom: 3%;padding-left: 10%;color:#FF8D58;">John s</td>
</tr>
</tbody>
</table>
Problem Statement:
I am wondering if the table I have used above is the right way to use in html email or if there is any changes I need to make ? The reason why I am asking this because I have never coded html emails before.
Using Flex in html-emails is not fully supported by Gmail, yahoo, outlook.com Check these two helpful links below:
Old question on stackoverflow.
Support guid
If you follow normal table layout approach it would be supported by the majority of email clients, as I noticed that you also used <div> tag which will raise a flag as well.
This code might need more work and styling but just to show how this works better than using display: flex:
<html>
<body>
<p style="font-size:20px;margin-left:22%;color:#55BEC7;"> hi XYZ, </p>
<table cellpadding="0" cellspacing="0" border="0" width="600" class="mobile" style="margin: 0 auto;" align="center">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" width="100%" style=" font-size:20px; padding: 0 0 0 15%;">
<tr>
<td style="padding-bottom: 3%;text-align:right;">type:</td>
<td style="padding-bottom: 3%;padding-left: 10%;">availability check request</td>
</tr>
<tr>
<td style="padding-bottom: 3%;text-align:right;">estimated total:</td>
<td style="padding-bottom: 3%;padding-left: 10%;">$250.00</td>
</tr>
<tr>
<td style="padding-bottom: 3%;text-align:right;">what</td>
<td style="padding-bottom: 3%;padding-left: 10%;">chainsaw</td>
</tr>
<tr>
<td style="padding-bottom: 3%;text-align:right;">how many</td>
<td style="padding-bottom: 3%;padding-left: 10%;">2</td>
</tr>
<tr>
<td style="padding-bottom: 3%;text-align:right;">when:</td>
<td style="padding-bottom: 3%;padding-left: 10%;word-wrap: break-word;
width: 300px;">March 28/18 # 7:00pm to March 30/18 # 7:00pm</td>
</tr>
<tr>
<td style="padding-bottom: 3%;text-align:right;">who:</td>
<td style="padding-bottom: 3%;padding-left: 10%;color:#FF8D58;">John s</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td>
<h2 style="text-align:center;color:#484848;margin-top:2.5%;margin-bottom:5%;">steps to earn your money:</h2>
</td>
</tr>
<tr style="text-align: left;margin-left: auto;width: 50%;padding-right: 0%; margin-right: auto;color:#484848;font-size:20px;" class="steps">
<td>
<p>1. click here to open the ABC app to the posting requests page </p>
<p>2. click on availability check request</p>
<p>3. say yes, its availabile ot suggest another date it is</p>
<p>4. wait the 1 or 24 hour confirmation good</p>
<p>5. three days after the booking ends money will be send to your account</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
When scripting automation with Selenium, I tried to locate a required web element with css selector, and I used the firebug to get the unique css path for that element. However, I was surprise since sometimes the firebug give me an incorrect css path although it works with selenium indeed.
<table width="100%" cellspacing="1" cellpadding="4" border="0" class="forumline">
<tbody><tr>
<th nowrap="nowrap" height="25" align="center" colspan="2" class="thcornerl"> Topic </th>
<th width="50" nowrap="nowrap" align="center" class="thtop"> Answers </th>
<th width="100" nowrap="nowrap" align="center" class="thtop"> Author </th>
<th width="50" nowrap="nowrap" align="center" class="thtop"> Views </th>
<th nowrap="nowrap" align="center" class="thcornerr"> Last message </th>
</tr>
<!-- TOPICS LISTING -->
<tr class="bg_small_yellow">
<td width="20" valign="middle" align="center" class="row1Announce"> <img alt="" src="/jforum/images/transp.gif" class="icon_folder_announce">
<span class="topictitle">
<a href="/jforum/posts/list/2.page">
Support JForum - Please read
</a>
</span>
</td>
<td valign="middle" align="center" class="row2Announce"><span class="postdetails">0</span></td>
<td valign="middle" align="center" class="row3Announce">
<span class="name">Admin</span>
</td>
<td valign="middle" align="center" class="row2Announce"><span class="postdetails">4</span></td>
<td valign="middle" nowrap="nowrap" align="center" class="row3Announce">
<span class="postdetails">20/03/2016 13:58:24<br>
Admin
<img border="0" alt="[Latest Reply]" src="/jforum/templates/default/images/icon_latest_reply.gif"></span>
</td>
</tr>
<tr class="bg_small_yellow">
<td width="20" valign="middle" align="center" class="row1"> <img alt="" src="/jforum/images/transp.gif" class="icon_folder">
<span class="topictitle">
<a href="/jforum/posts/list/3.page">
[Poll]
Which one is your favorite?
</a>
</span>
</td>
<td valign="middle" align="center" class="row2"><span class="postdetails">0</span></td>
<td valign="middle" align="center" class="row3">
<span class="name">yinzhenzhixin</span>
</td>
<td valign="middle" align="center" class="row2"><span class="postdetails">8</span></td>
<td valign="middle" nowrap="nowrap" align="center" class="row3">
<span class="postdetails">20/03/2016 14:34:25<br>
yinzhenzhixin
<img border="0" alt="[Latest Reply]" src="/jforum/templates/default/images/icon_latest_reply.gif"></span>
</td>
</tr>
<tr class="bg_small_yellow">
<td width="20" valign="middle" align="center" class="row1"> <img alt="" src="/jforum/images/transp.gif" class="icon_folder">
<span class="topictitle">
<a href="/jforum/posts/list/1.page">
Welcome to JForum
</a>
</span>
</td>
<td valign="middle" align="center" class="row2"><span class="postdetails">1</span></td>
<td valign="middle" align="center" class="row3">
<span class="name">Admin</span>
</td>
<td valign="middle" align="center" class="row2"><span class="postdetails">6</span></td>
<td valign="middle" nowrap="nowrap" align="center" class="row3">
<span class="postdetails">20/03/2016 14:09:51<br>
yinzhenzhixin
<img border="0" alt="[Latest Reply]" src="/jforum/templates/default/images/icon_latest_reply.gif"></span>
</td>
</tr>
<!-- END OF TOPICS LISTING -->
<tr align="center">
<td valign="middle" height="28" align="right" colspan="6" class="catbottom">
<table cellspacing="0" cellpadding="0" border="0">
<tbody><tr>
<td align="center"><span class="gensmall"> </span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
I need the span which under the third tr whose class name is "bg_small_yellow". However, the firebug give me the unique css path as "tr.bg_small_yellow:nth-child(4) > td:nth-child(2) .topictitle > a:nth-child(1)", you see there are only 3 bg_small_yellow in total. where is the 4th one? How does it work?
You can use unique X Paths to access web elements.
Selenium Command
Hope the above mentioned link helps to solve your problem!
I'm having some grief with tables I'm trying to set up in WordPress. Have a look here - the page looks OK when at a normal desktop width (say 1000px), but when you narrow it down below about 750px, the tables start repeating information for no apparent reason. I've flicked through my CSS and through my tables themselves and can't seem to find any immediate reason why. This is only a problem for when mobile users try to view the page.
One of the tables is as follows.
<table style="height: 25px;" border="1" width="673" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>WEEK</strong></em></td>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>PRICE</strong></em></td>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>AVAILABLE</strong></em></td>
</tr>
</tbody>
</table>
<table style="height: 120px;" border="1" width="673" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align: center;" valign="bottom" width="206"><em><strong> 3rd Jan to 10th Jan</strong></em></td>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>£359</strong></em></td>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>Available </strong></em></td>
</tr>
<tr>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>10th Jan to 17th Jan</strong></em></td>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>£359</strong></em></td>
<td style="text-align: center;" valign="bottom" width="206"><em><strong> <strong><em>Available </em></strong></strong></em></td>
</tr>
<tr>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>17th Jan to 24th Jan</strong></em></td>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>£359</strong></em></td>
<td style="text-align: center;" valign="bottom" width="206"><em><strong> <strong><em>Available </em></strong></strong></em></td>
</tr>
<tr>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>24th Jan to 31st Jan</strong></em></td>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>£359</strong></em></td>
<td style="text-align: center;" valign="bottom" width="206"><span style="color: #ff0000;"><em><strong> <span style="color: #000000;"><strong><em>Available </em></strong></span></strong></em></span></td>
</tr>
<tr>
<td style="text-align: center;" valign="bottom" width="206"><b><i>31st Jan to 7th Feb</i></b></td>
<td style="text-align: center;" valign="bottom" width="206"><em><strong>£359</strong></em></td>
<td style="text-align: center;" valign="bottom" width="206"><em><strong> <span style="color: #ff0000;"><strong><em>BOOKED</em></strong></span></strong></em></td>
</tr>
</tbody>
</table>
Any ideas why this might be doing this?
It's hard to know for sure without seeing your CSS, but there will be a breakpoint set for 785px that displays elements with class 'pinned', making the duplicate table entries appear.
try:
#media all max-width: 785px {
.pinned {
display:none !important;
}
}
Hello I was wondering if it's possible with a css table to have alternating colour rows? I would like it to look like this,
http://i.imgur.com/zT04atv.jpg
My code so far for the table is this. I have tried but just can't seem to get it to work. Is this possible? And if so how would I implement it? Thanks.
<table style="height: 448px;" width="1007">
<tbody>
<tr>
<td style="text-align: center;">
<p>Pricing</p>
<p>Structure</p>
</td>
<td style="text-align: center;">
<p>Professional</p>
<p>Resume</p>
<p>$199</p>
</td>
<td style="text-align: center;">
<p>Managerial</p>
<p>Resume</p>
<p>$299</p>
</td>
<td style="text-align: center;">
<p>Executive</p>
<p>Resume</p>
<p>$399</p>
</td>
<td style="text-align: center;">
<p>C-Suite</p>
<p>Resume</p>
<p>$499</p>
</td>
</tr>
<tr>
<td style="text-align: center;">Resume Specs</td>
<td style="text-align: center;">2-3 pg resume</td>
<td style="text-align: center;">4-5 pg resume</td>
<td style="text-align: center;">
<p>+ cover sheet and</p>
<p>graphics</p>
</td>
<td style="text-align: center;">+ standalone bio pg</td>
</tr>
<tr>
<td style="text-align: center;">Phone Interview</td>
<td style="text-align: center;">Tick</td>
<td style="text-align: center;">Tick</td>
<td style="text-align: center;">Tick</td>
<td style="text-align: center;">
<p>Tick</p>
</td>
</tr>
<tr>
<td style="text-align: center;">Draft To Approve</td>
<td style="text-align: center;">Tick</td>
<td style="text-align: center;">Tick</td>
<td style="text-align: center;">Tick</td>
<td style="text-align: center;">Tick</td>
</tr>
<tr>
<td style="text-align: center;">Template Options</td>
<td style="text-align: center;"> </td>
<td style="text-align: center;"> </td>
<td style="text-align: center;">Tick</td>
<td style="text-align: center;">Tick</td>
</tr>
<tr>
<td style="text-align: center;">Extras</td>
<td style="text-align: center;"> </td>
<td style="text-align: center;"> </td>
<td style="text-align: center;">
<p>+ Free LinkedIn</p>
<p>profile</p>
</td>
<td style="text-align: center;">
<p>+ Free LinkedIn</p>
<p>profile</p>
</td>
</tr>
<tr>
<td style="text-align: center;">Delivery</td>
<td style="text-align: center;">
<p>.docx & .pdf</p>
<p>versions</p>
</td>
<td style="text-align: center;">
<p>.docx & .pdf</p>
<p>versions</p>
</td>
<td style="text-align: center;">
<p>.docx & .pdf</p>
<p>versions</p>
</td>
<td style="text-align: center;">
<p>.docx & .pdf</p>
<p>versions</p>
</td>
</tr>
<tr>
<td style="text-align: center;">Cover Letter</td>
<td style="text-align: center;">+ $50</td>
<td style="text-align: center;">+ $50</td>
<td style="text-align: center;">+ $50</td>
<td style="text-align: center;">+ $50</td>
</tr>
<tr>
<td style="text-align: center;">
<p>If your not sure where</p>
<p>your job would fit, please</p>
<p>get in touch to discuss </p>
<p>your arrangements</p>
</td>
<td style="text-align: center;">
<p>Vocations (such as</p>
<p>teaching & nursing)</p>
<p>Early career professionals</p>
</td>
<td style="text-align: center;">
<p>Managers and Senior</p>
<p>professionals (lawyers,</p>
<p>medical doctors), BDM's</p>
<p>consultants...</p>
</td>
<td style="text-align: center;">
<p>Senior Managers and Exec</p>
<p>Directors (Operations</p>
<p>Managers, GMs, Head of</p>
<p>Department</p>
</td>
<td style="text-align: center;">
<p>CEOs, CFOs, COOs, CIOs,</p>
<p>Managing Directors, Board</p>
<p>Members & Non-Execs,</p>
<p>Practice Directors & Principals</p>
</td>
</tr>
</tbody>
</table>
You can use the CSS3 that allows to put style to the odd or even elements of a selector.
td:nth-child(odd) {
background: #ff0000;
}
td:nth-child(even) {
background: #0000ff;
}
Folks, I have divs set up that are display:none. There are several. there is a script that is ran that when on link is clicked it changes that particular div to display:block. What I need is a way to use a direct hyperlink to automatically show that particular div. Any Ideas?
Thanks, Plasmagrid
NORMAL HEADER INFORMATION ---------
<script type="text/javascript" src="http://domainlocation/Scripts/jquery.min.js"></script>
<script type="text/javascript">
function showonlyone(thechosenone) {
$('div[name|="newboxes"]').each(function(index) {
if ($(this).attr("id") == thechosenone) {
$(this).show(300);
}
else {
$(this).hide(300);
}
});
}
</script>
<BODY>
<BASEFONT SIZE="2" FACE="Arial">
<div ALIGN="center">
<TABLE CELLPADDING=3 BORDER=0 width="900px" style="font-size:14px;">
<tr>
<td>
<div align="center">
<a class="trbgshdw1" href="javascript:showonlyone('NucleusLst');" id="Nucleus">Nucleus Utilities</a>
<span style="margin-left:25px;"><a class="trbgshdw1" href="javascript:showonlyone('DisplayLst');" id="Display">Display (Monitor) Drivers</a></span>
<span style="margin-left:25px;"><a class="trbgshdw1" href="javascript:showonlyone('BiosLst');" id="Bios">Bios Utilities</a></span>
<span style="margin-left:25px;"><a class="trbgshdw1" href="javascript:showonlyone('CDImgLst');" id="CDImg">CD Imaging Utilities</a></span>
<span style="margin-left:25px;"><a class="trbgshdw1" href="javascript:showonlyone('DataCapLst');" id="DataCap">Data Capture Utility</a></span>
<br><br>
<a class="trbgshdw1" href="javascript:showonlyone('EdgePortLst');" id="EdgePort">EdgePort Drivers / Utilities</a>
<span style="margin-left:25px;"><a class="trbgshdw1" href="javascript:showonlyone('FTPLst');" id="FTP">FTP Utility</a></span>
<span style="margin-left:25px;"><a class="trbgshdw1" href="http://asonet.wayne.com/extranet/dl-Fusion.asp" id="Fusion">Fusion</a>
<span style="margin-left:25px;"><a class="trbgshdw1" href="javascript:showonlyone('HostLdrLst');" id="HostLdr">Host Loader Files</a></span>
<span style="margin-left:25px;"><a class="trbgshdw1" href="javascript:showonlyone('ModemLst');" id="Modem">Modem Drivers</a></span>
<span style="margin-left:25px;"><a class="trbgshdw1" href="javascript:showonlyone('NetworkLst');" id="Network">Network Drivers</a></span>
<br><br>
<a class="trbgshdw1" href="javascript:showonlyone('OracleLst');" id="Oracle">Oracle Files / Utilities</a>
<span style="margin-left:25px;"><a class="trbgshdw1" href="javascript:showonlyone('TankMonLst');" id="TankMon">Tank Monitoring Utilities</a></span>
<span style="margin-left:25px;"><a class="trbgshdw1" href="javascript:showonlyone('TelnetLst');" id="Telnet">Telnet Utility For ESR</a></span>
<span style="margin-left:25px;"><a class="trbgshdw1" href="javascript:showonlyone('ZipUtilLst');" id="ZipUtil">Zip / Unzip Utilities</a></span>
</div>
<br>
<!-- ** NUC **-->
<div align="left" id="NucleusLst" name="newboxes" style="display: none;"><span style="color:#FFFFFF;font-size:22px;font-weight:bold;line-height:15px;">Nucleus</span>
<table border="0" cellpadding="3" width="100%">
<TR bgcolor="#ffffff">
<td align="center" WIDTH="340px"><strong>Filename</strong></td>
<td align="center" width="*"><strong>Filesize</strong></TH>
<td align="center" WIDTH="400px"><strong>File Description</strong></Td>
</TR>
<TR bgcolor="#ffffff">
<TD>FILE</TD>
<TD align="center">57 MB</TD>
<TD>Java 1.5.0.05 <br> It is used for reloading</TD>
</TR>
<TR bgcolor="#ffffff">
<TD>FILE</TD>
<TD align="center">116 KB</TD>
<TD>Diagnostic Files</TD>
</TR>
<TR bgcolor="#ffffff">
<TD>FILE</TD>
<TD align="center">161 KB</TD>
<TD>
For use with sites which may have difficulty with time change<br>
occuring on 11/01/2009.<br>
</TD>
</TR>
<TR bgcolor="#ffffff">
<TD>FILE</TD>
<TD align="center">3.83 MB</TD>
<TD> Installation Files and Instructions</TD>
</TR>
<TR bgcolor="#ffffff">
<TD>FILE</TD>
<TD align="center">700 KB</TD>
<TD><br>(replacement for ver4.03 CDs)</TD>
</TR>
<TR bgcolor="#ffffff">
<TD>FILE</TD>
<TD align="center">56 KB</TD>
<TD>Matrix (as of 12/13/05)</TD>
</TR>
<TR bgcolor="#ffffff">
<TD>FILE</TD>
<TD align="center">3 KB</TD>
<TD>Memory upgrade </TD>
</TR>
</table>
</div>
<!-- ** DISPLAY **-->
<div align="left" id="DisplayLst" name="newboxes" style="display: none;"><span style="color:#FFFFFF;font-size:22px;text-align:left;font-weight:bold:">Display (Monitors)</span>
<table border="0" cellpadding="3" width="100%">
<TR bgcolor="#ffffff">
<td align="center" WIDTH="340px"><strong>Filename</strong></td>
<td align="center" width="*"><strong>Filesize</strong></TH>
<td align="center" WIDTH="400px"><strong>File Description</strong></Td>
</TR>
<TR bgcolor="#ffffff">
<TD>FILE</TD>
<TD align="center">2.7 MB</TD>
<TD>Drivers </TD>
</TR>
<TR bgcolor="#ffffff">
<TD>FILE</TD>
<TD align="center">3.9 MB</TD>
<TD>Updated drivers.</TD>
</TR>
<TR bgcolor="#ffffff">
<TD>FILE</TD>
<TD align="center">7 MB</TD>
<TD> Installation Manual<sup>Draft</sup></TD>
</TR>
</table>
</div>
<!-- ** BIOS **-->
<div align="left" id="BiosLst" name="newboxes" style="display: none;"><span style="color:#FFFFFF;font-size:22px;text-align:left;font-weight:bold:">B I O S</span>
<table border="0" cellpadding="3" width="100%">
<TR bgcolor="#ffffff">
<td align="center" WIDTH="340px"><strong>Filename</strong></td>
<td align="center" width="*"><strong>Filesize</strong></TH>
<td align="center" WIDTH="400px"><strong>File Description</strong></Td>
</TR>
<TR bgcolor="#ffffff">
<TD>FILE<BR><br>FILE</TD>
<TD align="center">1 MB<br><br>2 MB</TD>
<TD><br>To install Bios Version 1.80 Using a Diskette<BR><br>To install Bios Version 1.80 Using a<br>Memory Key,Flash Drive, Thumb Drive</TD>
</TR>
<TR bgcolor="#ffffff">
<TD align="center">FILE</TD>
<TD align="center">168 KB</TD>
<TD>Service Memo </TD>
</TR>
<TR bgcolor="#ffffff">
<TD align="center">**********</TD>
<TD align="center">NA</TD>
<TD>INFORMAITON TO BE ADDED</TD>
</TR>
</table>
</div>
and so on for more DIVS
with jquery:
$('a').on('click', function(e) {
var id = $(this).attr('href');
$(id).show();
// or from your example:
showonlyone(id);
});
If you don't want all links do have the event attached to them you need a way to identify them.
$('a[data-toggle="target"]').on('click', function(e) {
var id = $(this).attr('href');
$(id).show();
// or from your example:
showonlyone(id);
});
In the previous example you'd be targeting anchors with the attribute data-toggle="target":
or you could target anchors referencing ids:
$('table a[href6^="#"]').on(...)
If the anchors are added to the document dynamically:
$('table').delegate('a[href6^="#"]', 'click', function(e) {...});