background preloader

Javascript

Facebook Twitter

JQuery - AJAX

The Seven Deadly Sins Of JavaScript Implementation - Smashing Magazine. Advertisement Using JavaScript has become increasingly easy over the last few years. Whereas back in the day we needed to know the quirks of every browser, now many libraries such as jQuery, YUI, Dojo and MooTools allow someone who doesn’t even know JavaScript to spruce up boring HTML documents with impressive and shiny effects. By piggy-backing on the CSS selector engine, we have moved away from the complexity and inconsistencies of the DOM and made things much easier. If you look at some of the code that has been released, though, we do seem to have taken a step backwards.

The rules for solid, maintainable and secure JavaScript haven’t changed, though. We’ve all had to work with code written by other people. Sins Of Our Fathers: Browser-Specific Code One of the main obstacles that kept us from evolving as developers was that JavaScript was largely browser-specific. This happens to be one reason why Internet Explorer 6 refuses to die. Libraries to the Rescue What do I mean by these? Web Standards Curriculum - Dev.Opera. Seven JavaScript Things I Wish I Knew Much Earlier In My Career - Smashing Magazine. Advertisement I’ve been writing JavaScript code for much longer than I care to remember. I am very excited about the language’s recent success; it’s good to be a part of that success story. I’ve written dozens of articles, book chapters and one full book on the matter, and yet I keep finding new things. Here are some of the “aha!” Shortcut Notations One of the things I love most about JavaScript now is shortcut notations to generate objects and arrays.

Var car = new Object(); car.colour = 'red'; car.wheels = 4; car.hubcaps = 'spinning'; car.age = 4; The same can be achieved with: Much shorter, and you don’t need to repeat the name of the object. The other handy shortcut notation is for arrays. Var moviesThatNeedBetterWriters = new Array( 'Transformers','Transformers2','Avatar','Indiana Jones 4' ); The shorter version of this is: var moviesThatNeedBetterWriters = [ 'Transformers','Transformers2','Avatar','Indiana Jones 4' ]; This is not Sparta; this is madness—don’t bother with this.

Resources. 45 Powerful CSS/JavaScript-Techniques - Smashing Magazine. Advertisement CSS and JavaScript are extremely powerful tools for designers and developers. However, sometimes it’s difficult to come up with the one excellent idea that would solve a problem that you are facing right now. Good news: almost every day designers and developers come up with fresh and clever CSS tricks and techniques and share them with other developers online. We regularly collect all these tricks, filter them, sort them, revise them and prepare them for Smashing Magazine readers. In this post we present 45 useful CSS/JavaScript-techniques that may help you find clever solutions to some of your problems or just get inspired by what is possible with CSS.

Please notice that this is the first part of our large round-up of fresh CSS/JavaScript-techniques. Interesting CSS Techniques Building the New Visual AnnotationsThese note overlays are composed of two main elements, an overlay with the shine and a border with the transparency. CSS Navigation Menus Sproing! CSS Lists.