Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

316
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!