Error in displaying html content using jquery?[UPDATED]

This is button or icon for invoice ,

              <i class="fas fa-file-invoice invoice" ></i>

on clicking this icon I want to show following invoice table
this is my html template for the invoice that I want to show on clicking the invoice-icon above

                      <div class="container-fluid">
<div class="row">
    <div class="col-lg-12">
        <div class="invoice-box">
   <table cellpadding="0" cellspacing="0" id="mytable">
<tr class="top">
  <td colspan="4">
    <table>
      <tr>
      <td>Invoice #: 123</td>
      </tr>
    </table>
  </td>
</tr>

<tr class="information">
  <td colspan="4">
    <table>
      <tr>
        <td><!-- some info  --></td>
        <td> Acme Corp.<br> John Doe<br> john@example.com</td>
      </tr>
    </table>
  </td>
</tr>

<tr class="heading">
  <td colspan="3">Payment Method
  </td>
  <td> Check </td>
</tr>

<tr class="details">
  <td colspan="3"> Check</td>
  <td> 1000</td>
</tr>

<tr class="heading">
  <td>Item</td>
  <td>Unit Cost</td>
  <td>Quantity</td>
  <td>Price</td>
</tr>

<tr class="item">
  <td><input value="Website design" /></td>
  <td>Rs<input type="number" value="300" /></td>
  <td><input type="number" value="1" /></td>
  <td> Rs.300</td>
</tr>

<tr class="item">
  <td><input value="xyz" /></td>
  <td>$<input type="number" value="75" /></td>
  <td><input type="number" value="1" /></td>
  <td>Rs.75</td>
</tr>

<tr class="item">
  <td><input value="xyz" /></td>
  <td>$<input type="number" value="10" /></td>
  <td><input type="number" value="1" /></td>
  <td>Rs.10</td>
</tr>

<tr class="total">
  <td colspan="3"></td>
  <td>Total: Rs.385</td>
</tr>
 </table>
       </div>   
    </div>
</div>
</div> 

this is how I am trying to get this but I am going wrong somewhere please guide m e

             // jquery for invoice 
     $(document).on('click','.invoice',function(){
        $('#mytable').show('.item');
      
    });

How can I fix this ? I have updated the above code, I just want to display the html content when I click the icon ?

Well, lets start with the beginning…

mkay…

right… so the URL to access is the rev attribute…

uhhh… “receipt” is not a URL. Did you mean “receipt.php”?

hey thank you for the reply actually That is my mistake I posted wrong code for that icon I just want to show that html template on clicking tis icon I will update the above code …

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.