With the FireUnit, extension for Firefox, written by John Resig, the author of jQuery library, you can profile your javascript application, which helps a lot the work with FireBug and Firefox.
Enjoy!
With the FireUnit, extension for Firefox, written by John Resig, the author of jQuery library, you can profile your javascript application, which helps a lot the work with FireBug and Firefox.
Enjoy!
Let’s assume you have a <div> element with 20 <a> tags inside, and each <a> tag has a <span> somewhere inside it. If you’d like to access all those spans you should use this jQuery line:
$('div a').children(':first-child') |
Common mistake is to query like that:
$('div a:first-child') |
but that is completely other thing, and will return the first <a> tag, not the <span> inside all of them.
I’ve actually made a custom timeline component wich I’ll post recently.
With a series of interesting posts Fabien Potencier explains what is a dependency injection and how to use it. Actually as the author says almost everyone of us has used it without even know it’s called ‘dependency injection’. Follow these two links to understand this technique by a given collection of very good examples:
When I heart about the new PHP 5.3 feature – the lambda functions I was really surprised. Yes really after we have in JavaScript such a powerfull tool, why not having it in PHP. Other new feature, waited so much, are the namespaces.
The anonymous functions is really a functional programming language feature such as scheme. There are lots of talks about the functional nature of JavaScript, but PHP was really different.
I’d like to see anonymous objects, yet again like in JS, in PHP. This is really powerfull, I hope more programmers would like to see such features in PHP.