jquery
You can subscribe to the jquery tag micro-feed.
This is a call to all my TypeScript connections. This is a call to all. We have a big problem with the official Definitely Typed definition for jQuery. The most fundamental definition for the JQuery interface is incorrect, as you can see in the snippet from jquery.d.ts below. We can fix it, but not without […]
This is just a little script I needed to use to increase text size conditionally. It only increases text below a minimum size and leaves everything else. Please also see a more recent post on CSS Clamp! (function () { var minFontSize = function () { $(“.content-zone *”).each(function () { var $this = $(this); if […]
If you have ever handled a resize event in JavaScript, you will have noticed that when a user manually resizes their browser window by dragging the edges… you get a lot of events. This is because the resize event fires constantly as the user resizes the window. $window.on(‘resize’, function () { // Your code gets […]
I don’t talk about jQuery very much because I avoid it wherever possible. However, I was working on some custom inputs that needed to respond to a number of events, including specific keys on the keyboard. To achieve this, I wrote a little jQuery extension called “bindactions” that allows you to get it all in […]
If you have seen the average Trello board that has evolved over any length of time, you will have noticed they can suffer a little from column explosion. Fear not. You can use this short script to get rid of the boring columns with a single click. All you need to do is adjust the […]
I’m not picking on jQuery in particular here. I chose it because it is no doubt the biggest and most widely used example of a JavaScript library. So when I mention jQuery here, be in no doubt that this applies to Prototype, Mootools, and any other framework that makes your JavaScript easier to write. And […]
A common question I have come across on various TypeScript communities is how to use RequireJS to load jQuery. Of course, you could substitute “jQuery” here for pretty much anything. Here is a simple example to explain the concept, which you can use to load pretty much anything you like using require.js. Downloads You’ll need […]
jQuery is taking the JavaScript world by storm, but because it makes life so easy, it also makes it easy to forget about the amount of work you are asking the browser to do. This is especially important if you are performing an action against multiple elements, in a loop or as part of an […]
I recently came across a problem while obtaining the text from an HTML label element, based on the fact that I knew the form element that related to the label. This came about because there are two valid ways to use a label. The first way is to use the “for” attribute on the label […]