Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

102
Visualizações
add action menu dynamically using jquery in power portals

I need to create a new menu item in the entity list called download. The html currently looks like this :

<td aria-label="action menu">
 <div class="dropdown action">
     <button class="btn btn-default btn-xs aria-exp" data-toggle="dropdown" aria-expanded="false" aria-label="action menu"> 
       <span class="fa fa-chevron-circle-down fa-fw" aria-hidden="true"></span>
     </button>
     <ul class="dropdown-menu" role="menu" style="position: fixed;">
       <li role="none">
           <a class="edit-link" role="menuitem" tabindex="-1" href="mypage?id=2f7d48cf-e98a-ec11-b820-0003ff6ac000" title="Edit" aria-setsize="1" aria-posinset="1">Edit</a>
       </li>
    </ul>
 </div>
</td>

I just need to append two more li underneath it. The JQuery that is used so far can load the html but I am stuck on how to append a menu item.

var list = $(".entity-grid")
list.on("loaded", function () {

if (list.find(".view-grid .table tbody tr td:last-child ul.dropdown-menu > li > a.details-link, .view-grid .table tbody tr td:last-child ul.dropdown-menu > li > a.edit-link, .view-grid .table tbody tr td:last-child ul.dropdown-menu > li > a.deactivate-link, .view-grid .table tbody tr td:last-child ul.dropdown-menu > li > a.delete-link, .view-grid .table tbody tr td:last-child ul.dropdown-menu > li > a.disassociate-link").length > 0) {
        var rows = $(this).find(".view-grid .table tbody tr td:last-child");
        $.each(rows, function (index, row) {
             //add new menu item here
             console.log('download PDF');
        });
    }

}); 
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda