views:

99

answers:

1

I have a table of locations. Each location has a individual url associated with it. I am using one column to activate / deactivate that url so I can turn locations off and on. I'm using jQuery's bind / click to do that with an AJAX request.

I now want to make clicking anywhere on that table row take the user to that individual url.

var url="http://mysite.com/"+jQuery(event.target).siblings("td.url").text();
jQuery(location).attr('href', url);

The problem is that it's intercepting my other columns click. Is there a way to say something like:

if(event.target != jQuery("td.active")){ //redirect }
+2  A: 
if(!jQuery(event.target).is('.active')) {

is what you want.

pib
Much thanks, that works!
Josh K