Highlight row is not getting disappear after I click the next table row

后端 未结 2 1224
鱼传尺愫
鱼传尺愫 2021-01-25 17:12

I need to create background as yellow while selecting the gear icon for the menu option in the table row, I have tried the below code for highlighting the table row,

<         


        
相关标签:
2条回答
  • 2021-01-25 17:21

    Check the difference between :first and :first-child

    var view = Core.view.Menu.create({
        model: model,
        menuContext: { ibmm: ibmm },
        anchor: this.$(),
        highlight: this.$().parents('tr:first-child').css('background-color','yellow')
    });
    view.show();
    
    0 讨论(0)
  • 2021-01-25 17:38

    you can try below jquery to reset your background color where event will occur on focusout.

    $(function(){
      $("table.content-table.highlighted tr.content-row").on("focusout", function(){
            $(this).css('background','#FFFF00 none 0 0 repeat'); // change color code as per your need
      });
    });
    
    0 讨论(0)
提交回复
热议问题