-
const URL = <request url> const OPTIONS = { val1 : “test” } $dropdown = $(“#dropdown”); $.getJSON(URL,OPTIONS).done(function (data) { $.map(data, function (val,index) { $dropdown.append($(‘<option>’, { value: val.id, text: val.text })); }); $dropdown.val($promoter.find(‘option:eq(0)’).val()).trigger(“change”); }); If you have any problem implementing this. Let me know in the comments. Cheers & Happy coding.
-
It is tedious to use arrow keys to move cursor in/our from parenthesis always. you can add a custom key binding for that task. Go to preferences > key bindings and add following code { “keys”: [“ctrl+enter”], “command”: “move”, “args”: {“by”: “subword_ends”, “forward”: true} } Of course you can use some other key instead “ctrl+enter”…
-
How to get all dates between two given dates in PHP ? Recently i needed date string array for a project i am working on. Let me show you how i implemented that. After some digging on PHP documentation. I found there’s a special PHP class DatePeriod that can be used to implement that. Photo by…
-
Feathericons is a simple open source icon library. by default icon size is 24px. You can use following simple html template on a blank page if you are starting from scratch. <!DOCTYPE html> <html lang=”en”> <title></title> <script src=”https://unpkg.com/feather-icons”></script> <body> <!– example icon –> <i data-feather=”circle”></i> <script> feather.replace() </script> </body> </html> Or you can install using…