Unit 7 Essay Criminal Law
function EnableTouchStyling(){ /* Notes oooooooooooooooooooooooooooooooooooooooooooooooooo */ /// Media queries for detecting touch and pointer event capabilities are not yet available (2013/01/01) \\\ /// Project authorities demand different interfaces for mobile/desktop browsers \\\ /// Touch event sniffing is currently the most reliable approach to determine touch enabled browsers \\\ console.log("EnableTouchStyling() \n--------------------------------------------------"); function main() { /* Normalize oooooooooooooooooooooooooooooooooooooooooooooooooo */ if (!window.console) console = {log: function() {}}; console.log("enableTouchStyling main()"); /* General oooooooooooooooooooooooooooooooooooooooooooooooooo */ /// Determine if browser supports touch events. \\\ var isTouchBrowser = 'ontouchstart' in document.documentElement; /// Same HTML structure, Two different versions, two different HTML classes\\\ /// Two versions multiplies time required for updates and fixes \\\ /// Since we must have two versions for the time being...\\\ /// Two stylings reduces complexities of overriding each other's styling \\\ /// Modularizes versions (anticipating future approval to use touch version across all devices and deletion of existing desktop version) \\\ function setStylingClass(){ if( isTouchBrowser ){ $(window).ready(function(){ $('html').addClass('touch_enabled_browser'); }); }else{ $(window).ready(function(){ $('html').addClass('non_touch_enabled_browser'); }); } // $(window).ready(function(){ // $('html').addClass('touch_enabled_browser'); // }); } setStylingClass(); } main(); } EnableTouchStyling.prototype.isTouch = function(){ console.log('isTouch()'); var isTouchBrowser = 'ontouchstart' in document.documentElement; return isTouchBrowser; // return true; // return false; };