jQuery – autocomplete()

Enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering.

jQuery – find()

Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.

jQuery – Adding a Timepicker to jQuery UI Datepicker

Link https://trentrichardson.com/examples/timepicker/   Example   <link rel=”stylesheet” href=”assets/jquery-ui/jquery-ui.min.css”/>     <link rel=”stylesheet” href=”assets/css/jquery-ui-timepicker-addon.min.css”/>     <script src=”assets/js/jquery.min.js”></script>     <script src=”assets/jquery-ui/jquery-ui.min.js”></script>     <script src=”assets/js/jquery-ui-timepicker-addon.min.js”></script>     <form id=”test”>         <input type=”text” id=”datum” name=”datum”>     </form>  <script>     $(function () {         $.datepicker.regional[‘cs’] = {             closeText: ‘Zavřít’,             prevText: ‘Předchozí’,             nextText: ‘Další’,             currentText: ‘Dnes’,             monthNames: [‘Leden’, ‘Únor’,…

jQuery – select – Výběr hodnoty a zakázání výběru jiné hodnoty

  function setValueZmenaStavu(stav) {     var inputId = “#frm-ukolFormular-typ_stavu_id”; var inputIdSelected = inputId + ”  option[value='” + stav + “‘]”;      $(inputIdSelected).prop(“selected”, true);      $(inputId).attr(“disabled”, true); }    

jQuery – Run PHP script by POST

$(“button.send-form-data”).click(function () {     var book = $(“#form-book”).val();     var price = $(“#form-price”).val();     var writer = $(“#form-writer”).val();     $.post(“any_script.php”,     {         book: book,         price: price,         writer: writer     })     .done(function (data) {         alert (data);     })     .fail(function () {         alert (‘Error!!!’);     }); });      

jQuery – Nastavení vlastnosti inputu

  $(“#neco”).val(“nějaký text”); $(“#neco”).prop(‘readonly’, true); $(“#neco”).attr(“onClick”,”alert(‘Pouze pro čtení.’)”);