Re: [jQuery] Passing current object to function

2006-09-30 Thread Christof Donat
Hi, I'm attempting to get the href element for the first link it finds and then set that as the url for the entire row's on-click event. Do you mean something like this? $.fn.tableHover = function(hoverClass) { $(tr,this).click(function() { window.location.href =

Re: [jQuery] Passing current object to function

2006-09-30 Thread Mungbeans
Christof Donat wrote: $.fn.tableHover = function(hoverClass) { $(tr,this).click(function() { window.location.href = $(this).find('a')[0].href; }).hover(function() { $(this).addClass(hoverClass); }, function() {

Re: [jQuery] Passing current object to function

2006-09-29 Thread Brandon Aaron
First rowAction is receiving the TR node. If you want to get the href of the first a tag in row passed to rowAction it will need to look something like this: function rowAction(row) { var href = $(row).find('a')[0].href; alert('href'); }; Second I think you might want to use the hover