javascript Programming Glossary: surprise
How does an anonymous function in JavaScript work? http://stackoverflow.com/questions/1140089/how-does-an-anonymous-function-in-javascript-work alert typeof test2 alert typeof test2 alerts 'undefined' surprise test1 alerts 'function' because test2 is a function. Live Demo..
Calculate width & height of the selected text (javascript) http://stackoverflow.com/questions/12603397/calculate-width-height-of-the-selected-text-javascript here http jsfiddle.net pankajparashar kv2Bp . But to my surprise the code displays the left the right co ordinates always the..
What are JavaScript's builtin strings? http://stackoverflow.com/questions/15978204/what-are-javascripts-builtin-strings 111e11 1 1 1 1 1 1 1 1^11 1 1 1 1 1.1 1 Sorry to ruin the surprise but when this is evaluated it returns this I love you in Chrome.. will easily understand how it works... and some can even surprise their beloved in cross browser way P.S. Yet Another Obfuscator..
What is the JavaScript >>> operator and how do you use it? http://stackoverflow.com/questions/1822350/what-is-the-javascript-operator-and-how-do-you-use-it well they're defined as behaving like floats. It wouldn't surprise me if some JavaScript engine actually used ints when it could..
Javascript equivalent of PHP's list() http://stackoverflow.com/questions/1954426/javascript-equivalent-of-phps-list Rhino. var a 1 var b 3 a b b a EDIT actually it wouldn't surprise me if the V8 Javascript library and thus Chrome supports this...
If you delete a DOM element, do any events that started with that element continue to bubble? http://stackoverflow.com/questions/2732818/if-you-delete-a-dom-element-do-any-events-that-started-with-that-element-contin of the majority is correct IE's on its own here. Quelle surprise. But Whether that relates to what you're seeing is another question..
Auto Load and Refresh Div every 10 Seconds with jQuery http://stackoverflow.com/questions/3121285/auto-load-and-refresh-div-every-10-seconds-with-jquery on all browsers then I load up IE and bang what a surprise no luck Index.html script type text javascript src http ajax.googleapis.com..
jquery's form submit not working in IE http://stackoverflow.com/questions/3770324/jquerys-form-submit-not-working-in-ie I realised that IE won't work as expected what a surprise unless the form that is being submitted has been added to DOM...
Send message to specific client with socket.io and node.js http://stackoverflow.com/questions/4647348/send-message-to-specific-client-with-socket-io-and-node-js this question Well you have to grab the client for that surprise you can either go the simple way var io io.listen server io.clients..
Javascript global variables http://stackoverflow.com/questions/4862193/javascript-global-variables scenario . Since this is the same as window.a 0 it's no surprise that this creates an enumerable property even on IE8 and below..
Is reading the `length` property of an array really that expensive an operation in JavaScript? http://stackoverflow.com/questions/5752906/is-reading-the-length-property-of-an-array-really-that-expensive-an-operation but then I wrote a little test @ jsperf.com and to my surprise using i array.length actually was faster in Chrome and in FF..
How to simulate magnifying glass on Web-page image (Javascript)? http://stackoverflow.com/questions/5849438/how-to-simulate-magnifying-glass-on-web-page-image-javascript at the page source but it's not especially readable no surprise . javascript html google doodle share improve this question..
Why is array.push sometimes faster than array[n] = value? http://stackoverflow.com/questions/614126/why-is-array-push-sometimes-faster-than-arrayn-value method vs direct addressing array n value . To my surprise the push method often showed to be faster especially in Firefox..
Switch statement for greater-than/less-than http://stackoverflow.com/questions/6665997/switch-statement-for-greater-than-less-than in all tested environments except in ... drumroll MSIE surprise surprise . This is the recommended way to implement it. if val.. tested environments except in ... drumroll MSIE surprise surprise . This is the recommended way to implement it. if val 1000 do..
jQuery - checkboxes like radiobuttons http://stackoverflow.com/questions/881166/jquery-checkboxes-like-radiobuttons and would certainly violate the principle of least surprise. Users have been conditioned to expect radios to accept 1 check..
Surprised that global variable has undefined value in JavaScript http://stackoverflow.com/questions/9085839/surprised-that-global-variable-has-undefined-value-in-javascript has undefined value in JavaScript Today I got completely surprise that global variable has undefined in certain case. Example.. console.log value value 20 console.log value test Still surprised you're getting undefined Explanation This is something that..
Write elements into a child iframe using Javascript or jQuery http://stackoverflow.com/questions/997986/write-elements-into-a-child-iframe-using-javascript-or-jquery is a W3C standard which FF supports but IE does not. surprise surprise javascript jquery iframe share improve this question.. a W3C standard which FF supports but IE does not. surprise surprise javascript jquery iframe share improve this question You..
|