hy everyone,
i have simple html code showing a table width
html
<table class="table_site">
<tr>
<td class="subsite"><a href="#">register</a></td>
<td class="subsite"><a href="#">login</a></td>
<td class="subsite"><a href="#">home</a></td>
<td class="subsite"><a href="#">market</a></td>
<td class="subsite"><a href="#">mail</a></td>
</tr>
</table>
now i´ve got some script
$(function() {
$('.subsite')
.click(function(){
$('.content').empty()
document.title = '..:: DIELECSUR S.L ::' + $current;
loadContent($current"_main.html")
$(this).css("text-decoration", "underline")
});
});
my real question is:
how can i use le shortest code to find the proper content of td.subsite class that when click on it, and use as a variable value to append text converting in a valid url lo load???
If what you’re trying to do is get the text from the link that was clicked on and use it in your jQuery, you can do that like this: