Converting a DOS intro to JavaScript/HTML5

One day I had the idea of converting my fr29b DOS intro to JavaScript. Using the canvas element of HTML5, this should be an easy task and offer a good performance as well. To make the port as similar as possible, the standard VGA DOS palette should be supported. Drawing the ARGB values into the canvas can be speed up […]

Continue Reading

JavaScript code snippets

Here is a small collection of JavaScript code snippets that I collected. Binding a click event handler in fnRowCallback of DataTables library will fire the event twice, use unbind before to prevent this: $(document).ready( function() { $(‘#example’).dataTable({ “fnRowCallback” : function(nRow, aData, iDisplayIndex) { $(nRow).unbind(‘click’).bind(‘click’, function() { alert(‘click’); }); } }); }); To get the row data of the clicked row […]

Continue Reading