Posts Tagged ‘jquery’

Defining JavaScript variables…

septembre 3, 2009 Laisser un commentaire


Do you know the difference in JavaScript between these variables declarations :

– myVar = « foo »

– var myVarVar = « foo »

In fact, the first one will have an unlimited scope, and thus accessible from the outer world, whereas the second one will only be accessible at this level and below.

As such, this is why the line « $.fn.myFunction = function(){bla};  » is used to declare new function to the jQuery object.

Similarly, make sure you use « var » in front of your own JavaScript variables to avoid name collisions !

Hope it helps !


PS : funny how I’ve plenty of long posts in mind but not yet written (out of laziness/lack of time) while at the same time I’m eager to write small ones on stuff I’ve just discovered… May be I should consider twitter more closely !

PPS : the (french) source of this post :

Étiquettes : , ,

Nice jQuery plugin


Crazy framework !

Étiquettes : , , ,

Book review : Learning JQuery

juillet 17, 2009 Laisser un commentaire

I recently read Learning JQuery, the version of 2007. I was reading it as a casual reader, just to get a better hand on JQuery.

My feeling about it is the following : it seems good at providing technical details but fails at « empowering » the reader and providing the big picture. I say « it seems » because I had difficulties to keep reading it, since I didn’t feel it attractive. So I’ve finished it through « scanning »… From an avid reader like me, that’s really an unusual move. Furthermore, I didn’t find advices/best practices about plugin usage and integration, which I was especially looking for.

Conclusion : grab it only if you’re an avid javascript developer willing to develop plugins and not afraid of connecting the chapters together yourself…

Ps : With further use of JQuery and hence of this book, I now realize that its index is very poor 😦

Étiquettes : , , ,
%d blogueurs aiment cette page :