Skip to content

Instantly share code, notes, and snippets.

View hadaytullah's full-sized avatar

Hadaytullah hadaytullah

View GitHub Profile
@hadaytullah
hadaytullah / deferred.js
Last active October 25, 2019 09:55
Deferred/Promise Sample
function a(){
var d1=$.Deferred();
_.defer(function(){
console.log("a executed");
d1.resolve("resolved");
//d1.reject("reject");
},500);
d1.pipe(function successPipe(){
console.log("local pipe");
$(document).ready(function () {
function sol(today,limit){
let incorrectStyle = 0;
$("tr").each(function (key, val) {
let $tds = $(this).find('td'),
$rowStyle = $(this).css('background-color'),
customerId = $tds.eq(0).text(),
issueDate = new Date($tds.eq(1).text()),
returnDate = $tds.eq(2).text?new Date($tds.eq(2).text()):new Date();