¡@

Home 

2014/10/16 ¤W¤È 12:09:15

jquery Programming Glossary: surprise

jQuery ajax (jsonp) ignores a timeout and doesn't fire the error event

http://stackoverflow.com/questions/1002367/jquery-ajax-jsonp-ignores-a-timeout-and-doesnt-fire-the-error-event

a wrapper around .ajax I decided to rewrite the thing and surprise surprise it works flawlessly. Now the fun starts though. When.. around .ajax I decided to rewrite the thing and surprise surprise it works flawlessly. Now the fun starts though. When I deliberately..

javascript methods that can not be called from jquery objects?

http://stackoverflow.com/questions/11158102/javascript-methods-that-can-not-be-called-from-jquery-objects

.append post So I tried to do it without using .get but surprise it worked even without .get with latest jquery but didn't work..

Latest jQuery version on Google's CDN

http://stackoverflow.com/questions/12608242/latest-jquery-version-on-googles-cdn

testing your code COMPLETELY you risk an unexpected surprise if the API for some critical method has changed. Here's what..

Fastest method for testing a fixed phone number pattern

http://stackoverflow.com/questions/16338714/fastest-method-for-testing-a-fixed-phone-number-pattern

library jquery undescore etc nothing. Not so much of a surprise but I though that someone may have tried. Unrolled loops still..

jQuery document.createElement equivalent?

http://stackoverflow.com/questions/268490/jquery-document-createelement-equivalent

div div 3500ms createElement 100ms I think it's no big surprise but document.createElement is the fastest method. Of course..

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...

Efficient, concise way to find next matching sibling?

http://stackoverflow.com/questions/4933236/efficient-concise-way-to-find-next-matching-sibling

can accept the full range of selectors. I'm always surprised that next selector doesn't do this but it doesn't and the docs.. and has to re parse the selector every time no great surprise it's slow. And of course I can't just throw a first on the end..

backbone.js - getting extra data along with the request

http://stackoverflow.com/questions/5711245/backbone-js-getting-extra-data-along-with-the-request

the parse method a secondary responsibility which might surprise some people e.g. returning something and modifying model state..

Jquery dataTables and tablesorter together

http://stackoverflow.com/questions/6268791/jquery-datatables-and-tablesorter-together

jsonData #companies .tablesorter But to my surprise even though the sorting works fine on the first page as soon..

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..

Anyone have ideas for solving the “n items remaining” problem on Internet Explorer?

http://stackoverflow.com/questions/734824/anyone-have-ideas-for-solving-the-n-items-remaining-problem-on-internet-explor

SW having problems with Microsoft's browser which doesn't surprise me at all . Unfortunately I don't have much control over the..

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..

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..

jQuery ajax (jsonp) ignores a timeout and doesn't fire the error event

http://stackoverflow.com/questions/1002367/jquery-ajax-jsonp-ignores-a-timeout-and-doesnt-fire-the-error-event

error handling or work with timeouts. Since .getJSON is just a wrapper around .ajax I decided to rewrite the thing and surprise surprise it works flawlessly. Now the fun starts though. When I deliberately cause a 404 by changing the URL or cause the.. or work with timeouts. Since .getJSON is just a wrapper around .ajax I decided to rewrite the thing and surprise surprise it works flawlessly. Now the fun starts though. When I deliberately cause a 404 by changing the URL or cause the network..

javascript methods that can not be called from jquery objects?

http://stackoverflow.com/questions/11158102/javascript-methods-that-can-not-be-called-from-jquery-objects

a .text b .text .each posts function index post #posts_div .append post So I tried to do it without using .get but surprise it worked even without .get with latest jquery but didn't work with 1.3 So made some fiddles to make it clear Not working..

Latest jQuery version on Google's CDN

http://stackoverflow.com/questions/12608242/latest-jquery-version-on-googles-cdn

each decimal update. If you update jQuery automatically without testing your code COMPLETELY you risk an unexpected surprise if the API for some critical method has changed. Here's what you should be doing write your code using the latest version..

Fastest method for testing a fixed phone number pattern

http://stackoverflow.com/questions/16338714/fastest-method-for-testing-a-fixed-phone-number-pattern

small string patterns There was no solution using any 3rd party library jquery undescore etc nothing. Not so much of a surprise but I though that someone may have tried. Unrolled loops still appear to be king. Many say that it is not necessary these..

jQuery document.createElement equivalent?

http://stackoverflow.com/questions/268490/jquery-document-createelement-equivalent

div 3800ms createElement 100ms jQuery 1.2 Chrome 11 div 3500ms div div 3500ms createElement 100ms I think it's no big surprise but document.createElement is the fastest method. Of course before you go off and start refactoring your entire codebase..

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

loads and refreshes a div every bla bla Seconds. Works perfectly 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 ajax libs jquery 1.3.0 jquery.min.js script..

jquery's form submit not working in IE

http://stackoverflow.com/questions/3770324/jquerys-form-submit-not-working-in-ie

it. Works in good browsers... After some trials and tribulations I realised that IE won't work as expected what a surprise unless the form that is being submitted has been added to DOM. So this was my solution. I hope it helps some of you. Please..

Efficient, concise way to find next matching sibling?

http://stackoverflow.com/questions/4933236/efficient-concise-way-to-find-next-matching-sibling

want var nextFoo this .nextMatching div.foo ...where nextMatching can accept the full range of selectors. I'm always surprised that next selector doesn't do this but it doesn't and the docs are clear about what it does so... I can always write it.. loop above creates and throws away all sorts of temporary objects and has to re parse the selector every time no great surprise it's slow. And of course I can't just throw a first on the end jQuery.fn.nextMatching function selector return this.nextAll..

backbone.js - getting extra data along with the request

http://stackoverflow.com/questions/5711245/backbone-js-getting-extra-data-along-with-the-request

method that you have. Purists would say that you are giving the parse method a secondary responsibility which might surprise some people e.g. returning something and modifying model state . However I think this is okay. share improve this answer..

Jquery dataTables and tablesorter together

http://stackoverflow.com/questions/6268791/jquery-datatables-and-tablesorter-together

GET url sSource data aoData success function jsonData fnCallback jsonData #companies .tablesorter But to my surprise even though the sorting works fine on the first page as soon as I move on to the subsequent pages as soon as I click on..

Switch statement for greater-than/less-than

http://stackoverflow.com/questions/6665997/switch-statement-for-greater-than-less-than

was 10ms instead of 1ms. if immediate This is the fastest in all tested environments except in ... drumroll MSIE surprise surprise . This is the recommended way to implement it. if val 1000 do something else if val 2000 do something else ..... 10ms instead of 1ms. if immediate This is the fastest in all tested environments except in ... drumroll MSIE surprise surprise . This is the recommended way to implement it. if val 1000 do something else if val 2000 do something else ... if val 30000..

Anyone have ideas for solving the “n items remaining” problem on Internet Explorer?

http://stackoverflow.com/questions/734824/anyone-have-ideas-for-solving-the-n-items-remaining-problem-on-internet-explor

the browser. If this is true it is only Microsoft server SW having problems with Microsoft's browser which doesn't surprise me at all . Unfortunately I don't have much control over the IIS configuration that will be hosting the app. Has anyone..

jQuery - checkboxes like radiobuttons

http://stackoverflow.com/questions/881166/jquery-checkboxes-like-radiobuttons

doing this because it would be considered bad for usability and would certainly violate the principle of least surprise. Users have been conditioned to expect radios to accept 1 check and checkboxes to accept many. Don't make your users think...

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

of the contentDocument property of an iframe. contentDocument is a W3C standard which FF supports but IE does not. surprise surprise javascript jquery iframe share improve this question You can do both you just have to target differently var.. contentDocument property of an iframe. contentDocument is a W3C standard which FF supports but IE does not. surprise surprise javascript jquery iframe share improve this question You can do both you just have to target differently var ifrm document.getElementById..