Something like this:
$(document).ready(function() {
$("td").click(function() {
var id = this.id;
// now do stuff with id!
});
});
--John
> How do I get the id of the item which was just clicked?
>
> For instance, if a user clicks a <td> which has a specific id, how do I use
> this id in my script?
>
> $(document).ready(function() {
> $("td").click(function() {
> // get the id of the table cell clicked
> // use the id in a script
> });
> });
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/