[jQuery] Re: Does "click" action not apply to TDs?

2008-05-05 Thread Donald J Organ IV
try: (remember jQuwery returns an array) $('#content')[0].click(function() { location = 'zipcodelookup.php'; }); [EMAIL PROTECTED] wrote: Hi, I'm trying to make a TD, with id = "content", clickable. Unfortunately, it doesn't seem to be working -- the action is not invoked when I cli

[jQuery] Re: Does "click" action not apply to TDs?

2008-05-05 Thread Richard D. Worth
Don't forget to put your code in a document.ready block. Your code is running before the element (#content) exists, because the DOM is not yet ready: $(document).ready(function() { $('#content').click(function() { location = 'zipcodelookup.php'; }); }); or, shortcut: $(function() { $('

[jQuery] Re: Does "click" action not apply to TDs?

2008-05-05 Thread [EMAIL PROTECTED]
Thanks both for your responses. As it turns out, problem was with forgetting to put document.ready code. - Dave On May 5, 10:16 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote: > Don't forget to put your code in a document.ready block. Your code is > running before the element (#content) exist