AES and MD5 Javascript implementations
You can find them here: http://www.movable-type.co.uk/scripts/aes.html http://www.webtoolkit.info/javascript-md5.html
You can find them here: http://www.movable-type.co.uk/scripts/aes.html http://www.webtoolkit.info/javascript-md5.html
var el = document.getElementById("main_menu"); var details = el.getBoundingClientRect(); Futher reading: http://ejohn.org/blog/getboundingclientrect-is-awesome/
Blog Post: https://plus.google.com/115133653231679625609/posts/H3onog42Msj?utm_source=javascriptweekly&utm_medium=email =========== http://shop.oreilly.com/product/9780596805531.do http://www.amazon.de/Effective-JavaScript-Specific-Software-Development/dp/0321812182/ref=sr_1_2?ie=UTF8&qid=1356887062&sr=8-2 https://leanpub.com/oopinjavascript http://www.amazon.com/Past-Present-Future-JavaScript-ebook/dp/B008MYLN3Y http://shop.oreilly.com/product/0636920018421.do http://www.amazon.com/gp/product/1593272820?ie=UTF8&tag=marijhaver-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1593272820
http://buildnewgames.com/dom-sprites/?utm_source=javascriptweekly&utm_medium=email
var wmq = window.matchMedia("(min-width: 400px)"); if (wmq.matches) { /* the view port is at least 400 pixels wide */ } else { /* the view port is less than 400 pixels wide */ } Event listener: wmq.addListener(function(wmq) { console.log(wmq.media + " " + (wmq.matches ? ‘matches’ : "doesn’t match")); }); Suppored in all browsers. (IE10+)
var el = document.elementFromPoint(x, y); Returns element with the highest z-index. Suppored in all browsers.
var rect = object.getBoundingClientRect(); Returns rect.top rect.left rect.right //Relative to left rect.bottom //Relative to right rect.width rect.height Bug in IE < 8 IEs adds 2px to each property (left, top, right, bottom) which have to be substracted manually. Suppored in all browsers.
var el = document.getElementById("foo"); if (el.matchesSelector("#foo")) { //do something } Prefixes el.mozMatchesSelector("#foo") el.webkitMatchesSelector("#foo") el.msMatchesSelector("#foo") el.oMatchesSelector("#foo") Suppored in all browsers.(IE9+)
var focused = document.activeElement Suppored in all browsers.
var input = document.getElementById("some-input"); Full selection: input.select(); Partial selection (selects second letter): input.setSelectionRange(1, 2); Putting carret in specific places: input.setSelectionRange(0, 0);//Begining of the input field input.setSelectionRange(1, 1);//After first letter To get beginning and end points of the selected text use: input.getSelectionStart input.getSelectionStart To set beginning and end points of the selected text use: input.getSelectionStart =… Read More »