“Font Awesome”: { “prefix”: “fa”, “body”: [ “<i class=\”fa fa-$2\” aria-hidden=\”true\”></i>” ], “description”: “Font Awesome template – just add the icon name!” } You then just have to type “fa” to have the Font Awesome default line to appear, and then fill the icon name. fa <i class=\”fa fa-[HERE!]” aria-hidden=\”true\”></i> <i class=\”fa fa-chevron-down”Continue reading “[Atom][Visual Studio Code] Font Awesome Shortcut/Snippet!”
Monthly Archives: October 2017
[jQuery][Datatables] Sort DataTables with a Select field
Javascript : $(document).ready(function () { var table = $(‘#datatable’).DataTable({ dom: ‘lr<“table-filter-container”>tip’, initComplete: function (settings) { var api = new $.fn.dataTable.Api(settings); $(‘.table-filter-container’, api.table().container()).append( $(‘#table-filter’).detach().show() ); $(‘#table-filter select’).on(‘change’, function () { table.search(this.value).draw(); }); } }); }); HTML : <p id=”table-filter” style=”display:none”> Chercher: <select> <option value=””>All</option> <option>Tag1</option> <option>Tag2</option> <option>Tag3</option> <option>Tag4</option> </select> </p> <table id=”datatable” class=”display tableContinue reading “[jQuery][Datatables] Sort DataTables with a Select field”
[PHP] Check Whether A String Is A Date
Quick code to check whether your string is a date. You can specify an input format. function isThisADate($date, $format = ‘Y-m-d H:i:s’) { return (DateTime::createFromFormat($format, $date) !== FALSE) ? true : false; } $date = ‘2017-10-500 10:11:12’; var_dump(isThisADate($date)); bool(false)
[Bootstrap 3] Customize Popovers with HTML Content And Custom Width
Popovers on Bootstrap are a handy thing to display some extra informations without overload the screen. They can not only be placed in A tag or BUTTON tag, but virtually in every tag needed. Here are some custom options for : How to display HTML in a popover ? How to dismiss popover on clickContinue reading “[Bootstrap 3] Customize Popovers with HTML Content And Custom Width”