Jquery Syntax

Source

  $("#search").on("keyup paste", function () {
            $.ajax({
                type: "GET",
                url: '@Url.Action("Search","PhoneBook")'+"/?text="+$("#search").val(),
                dataType: 'html',
                contentType: 'application/html; charset=utf-8',
                success: function (content, ajaxObj) {
                    $("#search_results").html(content);
                },
            });
        })
//DOM Ready
//https://api.jquery.com/ready/
$( document ).ready(function() {
  // Handler for .ready() called.
});

Sleep

function sleep (time) {
  return new Promise((resolve) => setTimeout(resolve, time));
}

// Usage!
sleep(500).then(() => {
    // Do something after the sleep!
})

results matching ""

    No results matching ""