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

309
Vistas
how to define an empty class in jquery?

image table

Currently, I'm doing a system where is manager can assign the job to workers. I have a table listing. In this table listing, when I click at Job Order Number, there will be a popup modal. What I'm having right now is, if the job status is pending, I want to show a different popup modal . Do you guys have any idea how can I achieve that ?

Currently, I'm doing like this where I declare the modal popus using php class.

 <td id="testing" data-id="<?php echo $row['jobregister_id'];?>" class = "<?php echo $row["job_status"]; ?>" data-target="doubleClick-info"  onClick="document.getElementById('doubleClick-info').style.display='block'"><?php echo $row["job_order_number"]; ?></td>
    <td><?php echo $row["job_priority"]; ?></td>
    <td"><?php echo $row["job_status"]; ?></td>

and here is my ajax for job status pending

 <div id="doubleClick-info" class="modal">
<div class="tabInfo">

    <input type="radio" name="tabDoingInfo" id="tabDoingInfo1" checked="checked">
    <label for="tabDoingInfo1" class="tabHeadingInfo"> Job Info </label>
    <div class="tab" id="JobInfoTab">
    <div class="contentJobInfo">
    <div class="techClose" data-dismiss="modal" onclick="document.getElementById('doubleClick-info').style.display='none'">&times</div>
    <form action="homeindex.php" method="post">
    <div class="info-details">
    
    </div></form></div></div>

    <script type='text/javascript'>
        $(document).ready(function () {
        $('body').on('click','.Pending',function(){
        // $('.JobInfo').click(function () {
        var jobregister_id = $(this).data('id');

        // AJAX request
        $.ajax({
        url: 'ajaxhomepending.php',
        type: 'post',
        data: { jobregister_id: jobregister_id },
        success: function (response) {
        // Add response in Modal body
        $('.info-details').html(response);
        // Display Modal
        $('#doubleClick-info').modal('show');
                    }
                });
            });
        });

    </script>

it all seems fine. i define the javascript using class. but when the class have no value, how do i define it ? do you guys have any idea how to do it. thank you so much.

about 4 years ago · Juan Pablo Isaza
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