Breathes there a web designer with wallet so fed who never to himself hath said, “Cutting and pasting this Lorem Ipsum stuff is utter tedium. It doesn’t look like English, and the first word isn’t even Latin.” Technologies have come a long way since cut and paste, and the time has come to use technologies [...]
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 [...]
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 [...]
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.
Things have come a long way since the early days of the web and standard JavaScript window.onload and element.onclick event handling. Even using JavaScript on your web page was risky business in the early days because the availability and acceptance of JavaScript was so unpredictable.
A couple of years ago, while integrating the WYMeditor Semantic HTML editor (http://wymeditor NULL.org/en/) into SkyBlueCanvas lightweight CMS (http://skybluecanvas NULL.com), I experimented with different ways to simplify adding custom buttons and fuctionality to WYMeditor.
A few days ago in a post titled Trigger Custom Events in jQuery (http://explainify NULL.it/javascript/trigger-custom-events-with-jquery/), I demonstrated how to work with jQuery.bind() and jQuery.trigger() to create and execute custom events. This article will explore jQuery events a bit more by taking a look at namespaced events.
I don’t know how, in the many years that I have been building web sites and using Ajax, I have never encountered a situation where I needed to return mixed HTML and executable JavaScript in an Ajax response. I routinely return JSON (JavaScript Object Notation) in Ajax responses as well as plain HTML but never [...]