How to add dots every 3 digits in currency values with JavaScript

If you’re European like me, you’re probably used to this notation: € 366.432 instead of 366,432 or 366432. In order to get this done in JavaScript you want to do the following: // Number var money = 366432; // Convert to String and add dots every 3 digits var moneyDots = money.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, “$1.”); // Set […]

How to fix getting stuck when scrolling up in Framework7

The problem in Framework7 In most webapps for iOS (not only Framework7) that use -webkit-overflow-scrolling:touch for scrolling within elements instead of the whole body you will experience the following issue: You scroll up to the very top of the document and then you scroll down immediately when you get the bounce back. You will notice […]

Simple iPhone5 detection with JavaScript

It’s really simple, just use this function: function isIphone5(){ function iOSVersion(){ var agent = window.navigator.userAgent, start = agent.indexOf( ‘OS ‘ ); if( (agent.indexOf( ‘iPhone’ ) > -1) && start > -1) return window.Number( agent.substr( start + 3, 3 ).replace( ‘_’, ‘.’ ) ); else return 0; } return iOSVersion() >= 6 && window.devicePixelRatio >= 2 […]

Flash Player 10.1 performance explosion

I am currently writing my diploma thesis at the University of Ulm on performance issues regarding Rich Internet Application technologies like Adobe Flash/Flex, JavaFX, Silverlight and various JavaScript solutions. (Update: It’s done! :-) ) I started back in December when I first noticed that Adobe’s Flash Player seriously has some performance issues. It always was […]