Hi , I want to make a script in jquery when I click on a link to appear
a message.
My code is below
<fieldset class="fild3">
<legend>links</legend>
<a href="" id="ca_125">CA-125</a><br>
<a href="" id="ca_153">CA 15-3</a>
</fieldset>
<fieldset class="fild2">
<legend>info</legend>
<span id="ca_125" class="ca_125">
<p>CA-125 </p>
</span>
<span id="ca_153" class="ca_153">
<p>CA 15-3 </p>
</span>
</fieldset>
<script type="text/javascript">
$(document).ready(function ()
{
$("span.ca_153").hide();
$("a#ca_125").click(function()
{
$("span.ca_125").show();
$("span.ca_153").hide();
});
$("a#ca_153").click(function()
{
$("span.ca_153").show();
$("span.ca_125").hide();
});
});
</script>
Because I have a lot of links can I do it somehow more dynamically.
I mean span name to take it from anchor id and to print text like
<?php echo array; ?>
Thanks a lot