skip to Main Content

I am using 2 loops, 1 for input and 1 for td. Can we achieve the same functionality with 1 loop in jQuery?

$("#bodyTargets tr").filter(function(index) { const firstTdText = Number($(this).find("td:first").text()) || 0; return !(firstTdText >= (Number($txtStartMonth.val()) || 0) && firstTdText <= (Number($txtEndMonth.val()) || 0)); }).each(function(index, element) { $(this).find("input").each(function() { $(this).prop("disabled", true); $(this).css('color', 'red'); }); $(this).find("td").each(function() { $(this).css('color', 'red'); }); }); <table class="table table-borderless…

VIEW QUESTION

Jquery – Finding the properties as an object in an html web page

I have an html web page containing the following tags: <div class="user_list"> <div onclick="dropUser(2483071,'Jack','m');" class="user_item"> <div class="avatar"><img " src="..."> </div> </div> <div onclick="dropUser(2483075,'Sara','f');" class="user_item"> <div class="avatar"><img " src="..."> </div> </div> .... </div> I want to make an array of objects…

VIEW QUESTION

jQuery Tab functions does not work with jQuery-UI versions

I had implemented a range slider by referring this link: How to create custom range sliders with min and max using CSS and JavaScript. For its jquery-ui reference, I tried using below two versions <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script> Range slider…

VIEW QUESTION

Jquery – Get minimum and maximum dates from JSON file for use with FlatPicker

I have an external file that is in the following format which i think is JSON but i am not 100% sure. {"result":["2008-09-29T00:00:00","2008-09-30T00:00:00","2008-10-01T00:00:00","2008-10-02T00:00:00","2008-10-03T00:00:00","2008-10-06T00:00:00","2008-10-07T00:00:00","2008-10-08T00:00:00","2008-10-09T00:00:00","2008-10-10T00:00:00","2008-10-13T00:00:00","2008-10-14T00:00:00","2008-10-15T00:00:00","2008-10-16T00:00:00","2008-10-17T00:00:00","2008-10-20T00:00:00","2008-10-21T00:00:00","2008-10-22T00:00:00","2008-10-23T00:00:00","2008-10-24T00:00:00","2008-10-27T00:00:00","2008-10-28T00:00:00","2008-10-29T00:00:00","2008-10-30T00:00:00","2008-10-31T00:00:00","2008-11-03T00:00:00","2008-11-04T00:00:00","2008-11-05T00:00:00","2008-11-06T00:00:00","2008-11-07T00:00:00","2008-11-10T00:00:00","2008-11-11T00:00:00","2008-11-12T00:00:00","2008-11-13T00:00:00","2008-11-14T00:00:00","2008-11-17T00:00:00","2008-11-18T00:00:00","2008-11-19T00:00:00","2008-11-20T00:00:00","2008-11-21T00:00:00","2008-11-24T00:00:00","2008-11-25T00:00:00","2008-11-26T00:00:00","2008-11-27T00:00:00"]} I am trying to get the miniumun date and maximum dates in the format MM/DD/YYYY so that…

VIEW QUESTION
Back To Top
Search