addEventListener and FadeOut not working with TR

Ok, I've looked and looked and tried various other working solutions but am still stuck and I'm about to throw something.

I'm attempting to have a TR fade out and then hide after a link within a cell of said TR is clicked, with the below methods:

1 - jQuerys fadeOut / fadeTo (I've tried both)

  function delTrans(id){
    var name = "chkSelect" + id;
    var chk = document.getElementById(name);
    var tableRow = $(chk).closest('tr');
    tableRow.addClass("transition");
    $(tableRow).find("td").fadeTo('slow',0,function(){
      alert("finished");
    }); 
  }

This doesn't seem to do much at all, no js errors or warnings are generated, and there is no change to the output displayed on screen.

2 - addEventListener:

  function delTrans(id){
    var name = "chkSelect" + id;
    var chk = document.getElementById(name);
    element = $(chk).closest("tr");
    element.addClass("transition");
    element.addEventListener("transitionend", 
      function () {
        element.addClass("hidden"); 
      },
      true
    );  

This only succeeds in generating a JS error of: Type Error. element.addEventListener is not a function. I have tried the addEventListener directly on the chk object and it is fine, implying that addEventListener wont work on the element 'tr'.

any suggestions welcomed

Answers


RESOLVED. Problem was with neither fadeOout() OR addEventListener. The problem was with the CSS. unable to post as I no longer have a copy of what it was prior to fixing the issue


Need Your Help

Is J2ME worth learning

java java-me mobile

I want to get into some mobile development. I studied a tiny bit of J2ME way back in the day and it wasn't too bad. But now with newer technologies like Android and so forth I ask myself if it is w...

Getting latitude & longitude values of different places to a value

javascript jquery google-maps-api-3

I am trying to find a set of latitude longitude values and assign it to a variable.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.