skip to Main Content

Filter Segment Array from Small Segment Array – Jquery

let big_coordinates_arr =[ [1,2],[3,4],[5,8],[7,9]] ; let small_coordinates_arr=[ [3,4],[7,9] ] ; let is_same = (arr1,arr2) => arr1.length == arr2.length && arr1.every(function(element, index) { return element === arr2[index]; }); let result = big_coordinates_arr.filter(c1 => !small_coordinates_arr.some(c2 => is_same(c1,c2))) console.log(result) let big_coordinates_arr =[ [[1,2],[3,4]],…

VIEW QUESTION

How to make specific input readonly and take value (0.00) when a specific value exists in another input using jQuery

$(document).on('change keyup', '.debtor , .creditor', function() { //get amt and qty value var debtor = $(this).closest('tr').find('.debtor').val(); var creditor = $(this).closest('tr').find('.creditor').val(); if (debtor > 0) { $(this).closest('tr').find('.creditor').val(0).css("pointer-events", "none", "cursor", "not-allowed"); } else {} if (creditor > 0) { $(this).closest('tr').find('.debtor').val(0).css("pointer-events", "none", "cursor",…

VIEW QUESTION
Back To Top
Search