conflicting jquery scripts in Node js project(model.show()) not workingIs there an “exists” function for jQuery?How do JavaScript closures work?Add table row in jQueryHow do I check if an element is hidden in jQuery?Setting “checked” for a checkbox with jQuery?How can I know which radio button is selected via jQuery?How to check whether a checkbox is checked in jQuery?Disable/enable an input with jQuery?jQuery scroll to element“Thinking in AngularJS” if I have a jQuery background?

Efficient deletion of specific list entries

Subnumcases as a part of align

The selling of the sheep

Why are condenser mics so much more expensive than dynamics?

Can an Iranian citizen enter the USA on a Dutch passport?

How to preserve a rare version of a book?

Primes in a Diamond

What does the phrase "go for the pin" mean here?

Which "exotic salt" can lower water's freezing point by –70 °C?

How long did it take Captain Marvel to travel to Earth?

How do I, as a DM, handle a party that decides to set up an ambush in a dungeon?

What is the thing used to help pouring liquids called?

Has the United States ever had a non-Christian President?

Python 3 - simple temperature program version 1.3

Is it normal for gliders not to have attitude indicators?

Debian 9 server no sshd in auth.log

What is the meaning of 「隣のおじいさんは言いました」

HSA - Continue to Invest?

What does the copyright in a dissertation protect exactly?

As a GM, is it bad form to ask for a moment to think when improvising?

Given a safe domain, are subdirectories safe as well?

What does the coin flipping before dying mean?

Is there a reason why Turkey took the Balkan territories of the Ottoman Empire, instead of Greece or another of the Balkan states?

What is monoid homomorphism exactly?



conflicting jquery scripts in Node js project(model.show()) not working


Is there an “exists” function for jQuery?How do JavaScript closures work?Add table row in jQueryHow do I check if an element is hidden in jQuery?Setting “checked” for a checkbox with jQuery?How can I know which radio button is selected via jQuery?How to check whether a checkbox is checked in jQuery?Disable/enable an input with jQuery?jQuery scroll to element“Thinking in AngularJS” if I have a jQuery background?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am trying to show a model but the model.show is not working. I have seen a similar problem asked here but I was not able to solve my issue.
my html code:



<table class="table table-bordered" id="mytable">
<thead class="thead-dark">
<tr>
<th scope="col">#</th>
<th scope="col">Username</th>
<th scope="col">Location</th>
<th scope="col">House Number</th>
<th scope="col" >Action</th>
</tr>
</thead>
<% var c=0; for(var i=0; i < data.length; i++) c++; %>
<tbody>
<tr>
<th scope="row"><%= c %></th>
<td><%= data[i].user_name %></td>
<td><%= data[i].location %></td>
<td><%= data[i].house_number %></td>
<td>
<a href="#" class="btn btn-success" >Edit</a>
<!-- <a href="javascript:void(0);" id="myDelete" data-toggle="modal" data-target="#myDeleteModal" class="btn btn-sm btn-danger myDelete" data-userid="<%= data[i].user_id %>">
<%= data[i].user_id %>Delete
</a> -->
<a href="javascript:void(0);" class="btn btn-sm btn-danger delete" data-id="<%= data[i].user_id %>">Delete</a>
</td>
</tr>
</tbody>
<% %>
</table>


my model



<!-- Delete Product Modal-->
<form id="add-row-form" action="/delete" method="post">
<div class="modal fade" id="DeleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="myModalLabel">Delete Product</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<strong>Are You Sure To Delete This Data?</strong>
</div>
<div class="modal-footer">
<input name="product_id" class="form-control product_id2" required>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-success">Delete</button>
</div>
</div>
</div>
</div>
</form>


my scripts.



<script src="bower_components/vendors/jquery/dist/jquery.min.js"></script>
<script src="bower_components/vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="bower_components/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/assets/js/main.js"></script>


<script src="bower_components/vendors/chart.js/dist/Chart.bundle.min.js"></script>
<script src="bower_components/assets/js/dashboard.js"></script>
jquery
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Vue -->
<script src="bower_components/assets/js/Vue.js"></script>
<!-- custom myscript.js -->
<script src="bower_components/assets/js/myscript.js"></script>
<script src="bower_components/assets/js/widgets.js"></script>
<script src="bower_components/vendors/jqvmap/dist/jquery.vmap.min.js"></script>
<script src="bower_components/vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
<script src="bower_components/vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
<script>
(function($)
"use strict";

jQuery('#vmap').vectorMap(
map: 'world_en',
backgroundColor: null,
color: '#ffffff',
hoverOpacity: 0.7,
selectedColor: '#1de9b6',
enableZoom: true,
showTooltip: true,
values: sample_data,
scaleColors: ['#1de9b6', '#03a9f5'],
normalizeFunction: 'polynomial'
);
)(jQuery);
</script>
<script>
$(document).ready(function()
//showing data to modal for edit record
$('#mytable').on('click','.edit',function()
var product_id = $(this).data('id');
var product_name = $(this).data('product_name');
var product_price = $(this).data('product_price');
$('#EditModal').modal('show');
$('.product_name').val(product_name);
$('.price').val(product_price);
$('.product_id').val(product_id);
);
//showing modal for delete record
$('#mytable').on('click','.delete',function()
$(this).hide();
var product_id = $(this).data('id');
$('#DeleteModal').modal('show');
$('.product_id2').val(product_id);
);

);
</script>


im not sure if its because of the the conflicting licks to jquerys as pointed by some people in similar question or maybe doing somewhere wrong.










share|improve this question




























    0















    I am trying to show a model but the model.show is not working. I have seen a similar problem asked here but I was not able to solve my issue.
    my html code:



    <table class="table table-bordered" id="mytable">
    <thead class="thead-dark">
    <tr>
    <th scope="col">#</th>
    <th scope="col">Username</th>
    <th scope="col">Location</th>
    <th scope="col">House Number</th>
    <th scope="col" >Action</th>
    </tr>
    </thead>
    <% var c=0; for(var i=0; i < data.length; i++) c++; %>
    <tbody>
    <tr>
    <th scope="row"><%= c %></th>
    <td><%= data[i].user_name %></td>
    <td><%= data[i].location %></td>
    <td><%= data[i].house_number %></td>
    <td>
    <a href="#" class="btn btn-success" >Edit</a>
    <!-- <a href="javascript:void(0);" id="myDelete" data-toggle="modal" data-target="#myDeleteModal" class="btn btn-sm btn-danger myDelete" data-userid="<%= data[i].user_id %>">
    <%= data[i].user_id %>Delete
    </a> -->
    <a href="javascript:void(0);" class="btn btn-sm btn-danger delete" data-id="<%= data[i].user_id %>">Delete</a>
    </td>
    </tr>
    </tbody>
    <% %>
    </table>


    my model



    <!-- Delete Product Modal-->
    <form id="add-row-form" action="/delete" method="post">
    <div class="modal fade" id="DeleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
    <div class="modal-content">
    <div class="modal-header">
    <h5 class="modal-title" id="myModalLabel">Delete Product</h5>
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    </div>
    <div class="modal-body">
    <strong>Are You Sure To Delete This Data?</strong>
    </div>
    <div class="modal-footer">
    <input name="product_id" class="form-control product_id2" required>
    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
    <button type="submit" class="btn btn-success">Delete</button>
    </div>
    </div>
    </div>
    </div>
    </form>


    my scripts.



    <script src="bower_components/vendors/jquery/dist/jquery.min.js"></script>
    <script src="bower_components/vendors/popper.js/dist/umd/popper.min.js"></script>
    <script src="bower_components/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="bower_components/assets/js/main.js"></script>


    <script src="bower_components/vendors/chart.js/dist/Chart.bundle.min.js"></script>
    <script src="bower_components/assets/js/dashboard.js"></script>
    jquery
    <script src="bower_components/jquery/dist/jquery.min.js"></script>
    <!-- Vue -->
    <script src="bower_components/assets/js/Vue.js"></script>
    <!-- custom myscript.js -->
    <script src="bower_components/assets/js/myscript.js"></script>
    <script src="bower_components/assets/js/widgets.js"></script>
    <script src="bower_components/vendors/jqvmap/dist/jquery.vmap.min.js"></script>
    <script src="bower_components/vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
    <script src="bower_components/vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
    <script>
    (function($)
    "use strict";

    jQuery('#vmap').vectorMap(
    map: 'world_en',
    backgroundColor: null,
    color: '#ffffff',
    hoverOpacity: 0.7,
    selectedColor: '#1de9b6',
    enableZoom: true,
    showTooltip: true,
    values: sample_data,
    scaleColors: ['#1de9b6', '#03a9f5'],
    normalizeFunction: 'polynomial'
    );
    )(jQuery);
    </script>
    <script>
    $(document).ready(function()
    //showing data to modal for edit record
    $('#mytable').on('click','.edit',function()
    var product_id = $(this).data('id');
    var product_name = $(this).data('product_name');
    var product_price = $(this).data('product_price');
    $('#EditModal').modal('show');
    $('.product_name').val(product_name);
    $('.price').val(product_price);
    $('.product_id').val(product_id);
    );
    //showing modal for delete record
    $('#mytable').on('click','.delete',function()
    $(this).hide();
    var product_id = $(this).data('id');
    $('#DeleteModal').modal('show');
    $('.product_id2').val(product_id);
    );

    );
    </script>


    im not sure if its because of the the conflicting licks to jquerys as pointed by some people in similar question or maybe doing somewhere wrong.










    share|improve this question
























      0












      0








      0








      I am trying to show a model but the model.show is not working. I have seen a similar problem asked here but I was not able to solve my issue.
      my html code:



      <table class="table table-bordered" id="mytable">
      <thead class="thead-dark">
      <tr>
      <th scope="col">#</th>
      <th scope="col">Username</th>
      <th scope="col">Location</th>
      <th scope="col">House Number</th>
      <th scope="col" >Action</th>
      </tr>
      </thead>
      <% var c=0; for(var i=0; i < data.length; i++) c++; %>
      <tbody>
      <tr>
      <th scope="row"><%= c %></th>
      <td><%= data[i].user_name %></td>
      <td><%= data[i].location %></td>
      <td><%= data[i].house_number %></td>
      <td>
      <a href="#" class="btn btn-success" >Edit</a>
      <!-- <a href="javascript:void(0);" id="myDelete" data-toggle="modal" data-target="#myDeleteModal" class="btn btn-sm btn-danger myDelete" data-userid="<%= data[i].user_id %>">
      <%= data[i].user_id %>Delete
      </a> -->
      <a href="javascript:void(0);" class="btn btn-sm btn-danger delete" data-id="<%= data[i].user_id %>">Delete</a>
      </td>
      </tr>
      </tbody>
      <% %>
      </table>


      my model



      <!-- Delete Product Modal-->
      <form id="add-row-form" action="/delete" method="post">
      <div class="modal fade" id="DeleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
      <div class="modal-content">
      <div class="modal-header">
      <h5 class="modal-title" id="myModalLabel">Delete Product</h5>
      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      </div>
      <div class="modal-body">
      <strong>Are You Sure To Delete This Data?</strong>
      </div>
      <div class="modal-footer">
      <input name="product_id" class="form-control product_id2" required>
      <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      <button type="submit" class="btn btn-success">Delete</button>
      </div>
      </div>
      </div>
      </div>
      </form>


      my scripts.



      <script src="bower_components/vendors/jquery/dist/jquery.min.js"></script>
      <script src="bower_components/vendors/popper.js/dist/umd/popper.min.js"></script>
      <script src="bower_components/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
      <script src="bower_components/assets/js/main.js"></script>


      <script src="bower_components/vendors/chart.js/dist/Chart.bundle.min.js"></script>
      <script src="bower_components/assets/js/dashboard.js"></script>
      jquery
      <script src="bower_components/jquery/dist/jquery.min.js"></script>
      <!-- Vue -->
      <script src="bower_components/assets/js/Vue.js"></script>
      <!-- custom myscript.js -->
      <script src="bower_components/assets/js/myscript.js"></script>
      <script src="bower_components/assets/js/widgets.js"></script>
      <script src="bower_components/vendors/jqvmap/dist/jquery.vmap.min.js"></script>
      <script src="bower_components/vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
      <script src="bower_components/vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
      <script>
      (function($)
      "use strict";

      jQuery('#vmap').vectorMap(
      map: 'world_en',
      backgroundColor: null,
      color: '#ffffff',
      hoverOpacity: 0.7,
      selectedColor: '#1de9b6',
      enableZoom: true,
      showTooltip: true,
      values: sample_data,
      scaleColors: ['#1de9b6', '#03a9f5'],
      normalizeFunction: 'polynomial'
      );
      )(jQuery);
      </script>
      <script>
      $(document).ready(function()
      //showing data to modal for edit record
      $('#mytable').on('click','.edit',function()
      var product_id = $(this).data('id');
      var product_name = $(this).data('product_name');
      var product_price = $(this).data('product_price');
      $('#EditModal').modal('show');
      $('.product_name').val(product_name);
      $('.price').val(product_price);
      $('.product_id').val(product_id);
      );
      //showing modal for delete record
      $('#mytable').on('click','.delete',function()
      $(this).hide();
      var product_id = $(this).data('id');
      $('#DeleteModal').modal('show');
      $('.product_id2').val(product_id);
      );

      );
      </script>


      im not sure if its because of the the conflicting licks to jquerys as pointed by some people in similar question or maybe doing somewhere wrong.










      share|improve this question














      I am trying to show a model but the model.show is not working. I have seen a similar problem asked here but I was not able to solve my issue.
      my html code:



      <table class="table table-bordered" id="mytable">
      <thead class="thead-dark">
      <tr>
      <th scope="col">#</th>
      <th scope="col">Username</th>
      <th scope="col">Location</th>
      <th scope="col">House Number</th>
      <th scope="col" >Action</th>
      </tr>
      </thead>
      <% var c=0; for(var i=0; i < data.length; i++) c++; %>
      <tbody>
      <tr>
      <th scope="row"><%= c %></th>
      <td><%= data[i].user_name %></td>
      <td><%= data[i].location %></td>
      <td><%= data[i].house_number %></td>
      <td>
      <a href="#" class="btn btn-success" >Edit</a>
      <!-- <a href="javascript:void(0);" id="myDelete" data-toggle="modal" data-target="#myDeleteModal" class="btn btn-sm btn-danger myDelete" data-userid="<%= data[i].user_id %>">
      <%= data[i].user_id %>Delete
      </a> -->
      <a href="javascript:void(0);" class="btn btn-sm btn-danger delete" data-id="<%= data[i].user_id %>">Delete</a>
      </td>
      </tr>
      </tbody>
      <% %>
      </table>


      my model



      <!-- Delete Product Modal-->
      <form id="add-row-form" action="/delete" method="post">
      <div class="modal fade" id="DeleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
      <div class="modal-content">
      <div class="modal-header">
      <h5 class="modal-title" id="myModalLabel">Delete Product</h5>
      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      </div>
      <div class="modal-body">
      <strong>Are You Sure To Delete This Data?</strong>
      </div>
      <div class="modal-footer">
      <input name="product_id" class="form-control product_id2" required>
      <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      <button type="submit" class="btn btn-success">Delete</button>
      </div>
      </div>
      </div>
      </div>
      </form>


      my scripts.



      <script src="bower_components/vendors/jquery/dist/jquery.min.js"></script>
      <script src="bower_components/vendors/popper.js/dist/umd/popper.min.js"></script>
      <script src="bower_components/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
      <script src="bower_components/assets/js/main.js"></script>


      <script src="bower_components/vendors/chart.js/dist/Chart.bundle.min.js"></script>
      <script src="bower_components/assets/js/dashboard.js"></script>
      jquery
      <script src="bower_components/jquery/dist/jquery.min.js"></script>
      <!-- Vue -->
      <script src="bower_components/assets/js/Vue.js"></script>
      <!-- custom myscript.js -->
      <script src="bower_components/assets/js/myscript.js"></script>
      <script src="bower_components/assets/js/widgets.js"></script>
      <script src="bower_components/vendors/jqvmap/dist/jquery.vmap.min.js"></script>
      <script src="bower_components/vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
      <script src="bower_components/vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
      <script>
      (function($)
      "use strict";

      jQuery('#vmap').vectorMap(
      map: 'world_en',
      backgroundColor: null,
      color: '#ffffff',
      hoverOpacity: 0.7,
      selectedColor: '#1de9b6',
      enableZoom: true,
      showTooltip: true,
      values: sample_data,
      scaleColors: ['#1de9b6', '#03a9f5'],
      normalizeFunction: 'polynomial'
      );
      )(jQuery);
      </script>
      <script>
      $(document).ready(function()
      //showing data to modal for edit record
      $('#mytable').on('click','.edit',function()
      var product_id = $(this).data('id');
      var product_name = $(this).data('product_name');
      var product_price = $(this).data('product_price');
      $('#EditModal').modal('show');
      $('.product_name').val(product_name);
      $('.price').val(product_price);
      $('.product_id').val(product_id);
      );
      //showing modal for delete record
      $('#mytable').on('click','.delete',function()
      $(this).hide();
      var product_id = $(this).data('id');
      $('#DeleteModal').modal('show');
      $('.product_id2').val(product_id);
      );

      );
      </script>


      im not sure if its because of the the conflicting licks to jquerys as pointed by some people in similar question or maybe doing somewhere wrong.







      javascript jquery html






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 23 at 4:34









      tenchotencho

      198




      198






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Your selector is wrong, try setting it this way:



          $(document).ready(function()
          //showing data to modal for edit record
          $('#mytable .edit').on('click', function()
          var product_id = $(this).data('id');
          var product_name = $(this).data('product_name');
          var product_price = $(this).data('product_price');
          $('#EditModal').modal('show');
          $('.product_name').val(product_name);
          $('.price').val(product_price);
          $('.product_id').val(product_id);
          );
          //showing modal for delete record
          $('#mytable .delete').on('click',function()
          $(this).hide();
          var product_id = $(this).data('id');
          $('#DeleteModal').modal('show');
          $('.product_id2').val(product_id);
          );

          );





          share|improve this answer























          • No, the selector is working fine because when i try to hide the button before model('show'), it works fine, but after that its not working.

            – tencho
            Mar 23 at 4:51











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55310638%2fconflicting-jquery-scripts-in-node-js-projectmodel-show-not-working%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Your selector is wrong, try setting it this way:



          $(document).ready(function()
          //showing data to modal for edit record
          $('#mytable .edit').on('click', function()
          var product_id = $(this).data('id');
          var product_name = $(this).data('product_name');
          var product_price = $(this).data('product_price');
          $('#EditModal').modal('show');
          $('.product_name').val(product_name);
          $('.price').val(product_price);
          $('.product_id').val(product_id);
          );
          //showing modal for delete record
          $('#mytable .delete').on('click',function()
          $(this).hide();
          var product_id = $(this).data('id');
          $('#DeleteModal').modal('show');
          $('.product_id2').val(product_id);
          );

          );





          share|improve this answer























          • No, the selector is working fine because when i try to hide the button before model('show'), it works fine, but after that its not working.

            – tencho
            Mar 23 at 4:51















          0














          Your selector is wrong, try setting it this way:



          $(document).ready(function()
          //showing data to modal for edit record
          $('#mytable .edit').on('click', function()
          var product_id = $(this).data('id');
          var product_name = $(this).data('product_name');
          var product_price = $(this).data('product_price');
          $('#EditModal').modal('show');
          $('.product_name').val(product_name);
          $('.price').val(product_price);
          $('.product_id').val(product_id);
          );
          //showing modal for delete record
          $('#mytable .delete').on('click',function()
          $(this).hide();
          var product_id = $(this).data('id');
          $('#DeleteModal').modal('show');
          $('.product_id2').val(product_id);
          );

          );





          share|improve this answer























          • No, the selector is working fine because when i try to hide the button before model('show'), it works fine, but after that its not working.

            – tencho
            Mar 23 at 4:51













          0












          0








          0







          Your selector is wrong, try setting it this way:



          $(document).ready(function()
          //showing data to modal for edit record
          $('#mytable .edit').on('click', function()
          var product_id = $(this).data('id');
          var product_name = $(this).data('product_name');
          var product_price = $(this).data('product_price');
          $('#EditModal').modal('show');
          $('.product_name').val(product_name);
          $('.price').val(product_price);
          $('.product_id').val(product_id);
          );
          //showing modal for delete record
          $('#mytable .delete').on('click',function()
          $(this).hide();
          var product_id = $(this).data('id');
          $('#DeleteModal').modal('show');
          $('.product_id2').val(product_id);
          );

          );





          share|improve this answer













          Your selector is wrong, try setting it this way:



          $(document).ready(function()
          //showing data to modal for edit record
          $('#mytable .edit').on('click', function()
          var product_id = $(this).data('id');
          var product_name = $(this).data('product_name');
          var product_price = $(this).data('product_price');
          $('#EditModal').modal('show');
          $('.product_name').val(product_name);
          $('.price').val(product_price);
          $('.product_id').val(product_id);
          );
          //showing modal for delete record
          $('#mytable .delete').on('click',function()
          $(this).hide();
          var product_id = $(this).data('id');
          $('#DeleteModal').modal('show');
          $('.product_id2').val(product_id);
          );

          );






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 23 at 4:46









          Irene MitchellIrene Mitchell

          443




          443












          • No, the selector is working fine because when i try to hide the button before model('show'), it works fine, but after that its not working.

            – tencho
            Mar 23 at 4:51

















          • No, the selector is working fine because when i try to hide the button before model('show'), it works fine, but after that its not working.

            – tencho
            Mar 23 at 4:51
















          No, the selector is working fine because when i try to hide the button before model('show'), it works fine, but after that its not working.

          – tencho
          Mar 23 at 4:51





          No, the selector is working fine because when i try to hide the button before model('show'), it works fine, but after that its not working.

          – tencho
          Mar 23 at 4:51



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55310638%2fconflicting-jquery-scripts-in-node-js-projectmodel-show-not-working%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현