Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

195
Vistas
How can I get the name of the nav-tab that is parent to current element?

I do know how to get the name of nav-tab when it is shown, but I am trying to get the name of the tab of a child element when the child element is changed. Just getting the name of the last tab clicked/shown won't help. I am using asp.net MVC Razor and need to find out what changed on the page and on what tabs. The user technically could click tabs without changing anything. I tried doing something like this:

    $('body').on('change', '.form-control', function () {
        var tab = this.closest('nav-tab');
    })

I have also tried:

    $('body').on('change', '.form-control', function () {
        var tab = this.closest('.nav-tab');
    })

but that did not work. There may be a better way to accomplish what I need. Any assistance is greatly appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Have you looked through the DOM to see where its nested? I've had luck in tables just going up to the TR then doing a find with the class. Maybe this sample will help?

$(".ctxMenu li").click(function () {
    var thisLink = $(this).closest("tr").find("input[id$='" + $(this).attr("data-action") + "']").attr("id");
    if (thisLink != "undefined") {
        $(this).closest("tr").find("input[id$='" + $(this).attr("data-action") + "']").click();
    }
    $(".ctxMenu").hide(100);
});
$(".jqSaveChangeDiv").change(function (e) {
    $(this).closest("div").find(".jqQuickUpdate2").trigger("click");
    console.log("Updated " + $(this).closest("div").find(".jqQuickUpdate2").attr("id"));
});
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda