Tag Archives: jQuery

Another great developer book found

Summer is here and book reading time for me is also here, I’ve read and added this great resource to my desk at work, JQuery and Javascript Phasebook.

JQuery And JavaScript Phasebook

I often like to have all my resources as pdf files but in some cases a reference book can come in handy. Easy to pick up without the need for extra screens (They are full with applications anyway)

This book is one of them, if you develop using jQuery this book has lots of short code snippets that will come in handy when developing using JQuery and Javascript.

 

 

 

The book has the basics of setting up the JQuery framework and start using it to creating Dom nodes, setting css styles,classes. Adding animations to elements and also a little section on how to use JQuery mobile.

And the great part is that the book has quick explanations and then a code snippet that you can test, So you will get a great reference guide and also learn to use jQuery more when you develop new applications.

The books developer audience is developers that isn’t experienced JQuery Developers but what to get started or just started to use JQuery.

Get your own copy here or from amazon

Dojo and jQuery part 2

Part 2 should have been some more examples but I feel that I need to write some about the response on my first part there where alot of comments discussing different things around Dojo vs jQuery.

First I like to say that my compare between these two was to show that you can do the same things with Dojo as you can do with jQuery and the code does look almost the same, also that Dojo has so much more inside the “package”. 

Joacim wrote why are you comparing an older version of Dojo than jQuery well because I´m mainly working with Dojo and xPages and the Domino server currently has an old version of Dojo and jQuery would be an addon to the server and then be of the latest version. But also to point out that even though Dojo 1.6 is 2 releases old you still can still use it and it will work great, and there is no need for jQuery. If you should learn one client side library it´s Dojo because this is what IBM is using for all the things in XPages.

I will continue with my Dojo travel in part 3 and that one will include some code I promise 😉

HTML manipulation Dojo vs jQuery

I have seen some writing by TexasSwede about how to use jQuery for manipulating the DOM and it seams easy but why import another toolkit for manipulating the DOM? Well perhaps if you know jQuery that might be the case or that you think jQuery is better. 

Let’s compare jQuery vs Dojo for some simple DOM changes. I’m using the latest jQuery 1.9 vs Dojo 1.6, why not the latest version well because XPages currently has 1.6 and because 1.8 has a different syntax.

let’s add the class pretty to every a tag in the page

 jQuery

  $("a").each( function() {
    var tag=$(this);
    tag.addClass('pretty');
  }

Dojo

 dojo.query("a").forEach(function(node, index, arr){
      node.addClass("pretty")
  });

The code is quite similar in both Dojo and jQuery, I don’t know about speed perhaps some of you readers know?

I’ll move forward in part 2 with some more Dojo stuff, stay tuned.

PS!Don’t forget to change your email signature

Sent from Lotus Notes – More than an inbox