MutationObserver + URLSearchParams So I had the opportunity to work with third party scripts that trigger changes in my web page that in turn would affect data being sent to another third party.
Appending DOM Elements Dynamically I couldn’t be sure whether it was fine to add pseudo-selectors for an element inline so I consulted Google. Continue Reading →
Sorting an HTML table using JQuery function sortTable(table, order, nr) { var asc = order === 'asc', tbody = table.find('tbody'); tbody.find('tr').sort(function(a, b) { if (asc) { return $('td:nth-child('+ nr +')', a).text().localeCompare($('td:nth-child('+ nr +')', b).text()); } else { return $('td:nth-child('+ nr +')', b).text().localeCompare($('td:nth-child('+ nr +')', a).text()); } }).appendTo(tbody); } sortTable($('#mytable'),'asc', 1); References: Native Javascript solutions: https://stackoverflow.com/questions/22906760/jquery-sort-table-data JQuery solutions: Echoed from: https://blog.niklasottosson.com/javascript/jquery-sort-table-rows-on-column-value/ http://jsfiddle.net/6sskjbod/1682/ Continue Reading →
HTML tables and JQuery Echoed from: http://www.dotnetcurry.com/showarticle.aspx?ID=956 HTML Tables can be pretty boring to look at! Continue Reading →
Google Forms Auto-reply Solution A colleague posted a Google form to gather details online about planned climbs. Continue Reading →
Good Javascript Resources http://www.hunlock.com/blogs/Essential_Javascript_–_A_Javascript_Tutorial — A well-written javascript reference series authored by Patrick Hunlock; has discussions on best practices, pros and cons; Has useful sample prototypes for method extensions; has downloadable PDF versions for some of the topics http://www.devshed.com/c/a/JavaScript/JavaScript-Exception-Handling/ — A short but concise article on Javascript exception handling Continue Reading →
I learned today that… … you can practically bypass fatal errors in javascript (e.g. Continue Reading →