While working on a project for work today, I encountered a problem that I apparently have never encountered before. What I thought was a very simple function call in jQuery turned out to be a bit more complicated. I needed to removed an HTML element from a string representation of an HTML snippet. jQuery doesn’t quite behave the way I expected and I had trouble finding a solution.
All things must eventually come to an end. SkyBlueCanvas lightweight CMS is officially at the end of its life. I built the very first incarnation of the software in 2003. Over the course of 8 years I spent thousands of hours developing the software and providing support. All of this was done for free. The software was downloaded over 50,000 times. I had an opportunity to interact with many very nice people around the world and made a few good friends in the process. But it is time to move on to other things. Continue reading
I can’t begin to count the number of times I have coded the same search field with the default value “Search…” in it and so that when the field receives focus, the text is cleared but magically reappears when the field blurs. Every time I code it I know I should save that snippet of code somewhere but it is always faster to just write it anew each time. Well, no more. I finally got around to writing jQuery plugin to allow me to add the focus/blur default value toggle to any field. I have very creatively named the plugin ‘Defaultify’. Continue reading
One of the most useful features of Drupal is the ability to define one’s own content types and field types. Prior to Drupal 7 one could create custom content types (limited to Title and Body fields) without using any third-party modules, or add custom fields to existing content types using the Content Construction Kit (CCK) module. In Drupal 7 most of the features of the CCK were moved to the Drupal Core so it is even easier to create custom content types and add an arbitrary number and arrangement of predefined as well as custom fields to an entity.
Drupal 7 also saw the introduction of a new concept in custom content types: entities. Through this new API, Drupal 7 allows you to define a completely custom type of data object or entity which can have its own menu paths, callback handlers, and access, display and storage rules. Continue reading
I recently had a conversation with a colleague about whether or not it would be beneficial to use a CSS framework on some of the enterprise web sites we build. His response was that he had experimented with them but he isn’t a fan of them. His reasons are consistent with the arguments I have read posted on various places on the world wide web. I, on the other hand, am not convinced by the arguments against using them. Continue reading
In this article, I will teach you how to develop a standard jQuery plugin. I will keep things as simple as possible and will only build a very trivial plugin, but through this example I will cover all of the important aspects of jQuery plugin development. Continue reading