skip to Main Content

Value of JavaScript variable when creating html element using jQuery

I have the following jquery/Javascript code which creates a new button on the screen $("#prefixed-list").append(` <li class="list-group-item d-flex my-auto mx-auto border-0" order="9999999999"> <button type="button" class="btn btn-info mt-3" onClick="prefixCall(urlDomain, searchContent, offset)">Load More</button> </li> `); urlDomain, searchContent, offset are all variables defined…

VIEW QUESTION

Failed to get td value by attribute jQuery

$(document).on("click", ".add", function() { // get the current row var currentRow = $(this).closest("tr"); var col1 = currentRow.find("td:eq(0)").text(); // get current row 1st table cell TD value var col2 = currentRow.find("td:eq(1)").text(); // get current row 2nd table cell TD value var…

VIEW QUESTION

Issues manipulating elements with Jquery

hourArray = [] var hour9 = $("#9").attr("id") var hour10 = $("#10").attr("id") var hour11 = $("#11").attr("id") var hour12 = $("#12").attr("id") var hour13 = $("#13").attr("id") var hour14 = $("#14").attr("id") var hour15 = $("#15").attr("id") var hour16 = $("#16").attr("id") var hour17 = $("#17").attr("id") var…

VIEW QUESTION
Back To Top
Search