having fun with code

Tag Archives: jquery

Creating HTML blocks with Mootools

Sometimes we need to create HTML from JS. There are multiple ways to do this, from using innerHTML to creating element by element appending child to parents, setting attributes, etc. And there are as many different opinions about what is the right way to do it. Meanwhile, once thing I missed from jQuery, not available [...]

Keyboard shortcuts in Drupal: Navigating through comments

It was one of the best features of Google Reader and Google GMail: the keyboard shortcuts, specially the ones to navigate through messages or posts (n = next, p = previous). I decided it was time to implement it on spaniards.es, so here is the code I used. So far it only navigates through comments [...]

Ajax comments in Drupal 5: How I made it – Part III

In Ajax comments in Drupal 5: How I made it parts I and II we saw the code needed on the back-end. Now, let’s see what goes on the client side: the Javascript. Submitting the comment with an ajax request Basically, to add a comment we need the node id (nid) and the comment text. [...]

Ajax comments in Drupal 5: How I made it – Part II

In Axaj comments in Drupal 5: How I made it – Part I I covered the most important part of the module code: saving comments to the database. Now, let’s see how to display them properly. Rendering the new comment Comments usually have more information than the user name and the comment text. In my [...]

Ajax comments in Drupal 5: How I made it – Part I

First of all, I would like to apologize for not publishing this the right way. I haven’t had time to put it all on a standalone module, which will make it easier to share the code at www.drupal.org. Feel free to grab the code and put it on a module if you wish (and let [...]

Highlighting elements with Firebug console

Today I had an issue with an element was breaking a page layout, making the page width wider than 960px. I tried to find it with Firebug, looking at the layout properties of some divs and elements, but I couldn’t find it. I knew it had to be there, so I decided to highlight all [...]

Injecting javascript with Firebug

Sometimes you may want to include a Javascript file on a live web page to see how things will work or to try new things. Usually you would do this by editing the source code including the new file but there is a fastest way if you have Firefox with Firebug. Just run the following [...]

JS.Class: a very nice object oriented approach

I have been using jQuery and Mootools in the last few months at work, among other libraries. So far, jQuery was my favorite because it is very fast and encapsulated (it doesn’t interfere with other librearies, etc). But I love Mootools too because of its object oriented approach and beautiful things like the Class class [...]

About the blog

This is a blog about development, focused mainly on Javascript but also other languages like python, shell scripts and more.

About the author

Eneko Alonso is a software engineer and UI developer with more than eight years of experience in software and web development. He lives in San Luis Obispo, California and works at LEVEL Studios.

Contact Info

Contact Info