Category: jquery
« Previous Entries Next Entries »
December 30, 2007
Inspired by this from PHP, I wanted a utility function to determine whether a given element came before or after another element in the DOM.
(function($){
$.order = function($a,$b) {
$a = $a.eq(0);
$b = $b.eq(0);
var c = ‘order-test’;
$a.addClass(c);
[...]
Categories: javascript, jquery, plugins |
No Comments »
December 30, 2007
A couple of months ago, a client wanted us to add a survey to one of their microsites to gauge user response. The idea was that if the user clicked a link to a page outside the microsite, then they’d see an in-browser popup window asking them to take a survey. Clicking yes would take [...]
Categories: howto, javascript, jquery |
Tags: ajax login, popup, survey | No Comments »
December 24, 2007
My partner saw the search results page for this blog and, always on the lookout for a way to improve things, suggested that it would benefit from a table of contents at the top. I could do this with Wordpress, of course, but it sounded like a good idea for a jQuery plugin, too.
A [...]
Categories: jquery, plugins |
Tags: table of contents, toc | 6 Comments »
December 24, 2007
I noticed I was getting a lot of visits via Google for my post on anchor-based URL navigation with jQuery, so I decided to write a plugin that would accomplish the same thing.
Download the plugin
View a demo
Call this function on an element that contains “panels” which, in turn, contain anchors. The container element should [...]
Categories: jquery, plugins |
Tags: anchor, navigation, progressive enhancement | 3 Comments »
December 19, 2007
I was receiving a JSON string that contained an HTML entity, like this:
{ myValue: ‘€30,000′ }
I was supposed to put the value of myValue into a text input. I assigned the value to a variable and tried:
$(’#myInput’).val(myValue);
but that was putting the string, literally, into the input:
€30,000
— this in spite of the fact that this [...]
Categories: jquery, troubleshooting |
2 Comments »
December 17, 2007
I just got done with a first draft of the graphTable plugin, which lets you take a simple HTML table and turn the data in it into a graph using jQuery and flot. Here’s a demo, and here’s the jQuery plugin page where I’ll continue development if there’s any interest.
The most basic usage is simple:
$(’#table1′).graphTable({series: [...]
Categories: front-end development, javascript, jquery, plugins |
Tags: flot, graph, table, tabular data | 21 Comments »
December 14, 2007
I just got done troubleshooting an issue with a page with some jQuery on it. The jQuery was in a script called from the head of the document, and its job was to rearrange some elements into tabs once the page was loaded.
In unpredictable cases (sequential reloads had different results), loading the page in [...]
Categories: front-end development, jquery, troubleshooting |
No Comments »
December 11, 2007
Given data like:
var data = {
“GUEST” : {
“visits” : 1734070,
“visits_pct” : 74,
“users” : 1,
“net_pv” : 3432781,
“users_pct” : 0,
[...]
Categories: javascript, jquery |
Tags: jquery | No Comments »
December 11, 2007
I’m working on a new template for a client, and they asked me to display some list elements in a random order on each page load. I did my Google due diligence, but didn’t come up with anything that wasn’t slideshow-like — what I wanted was just something that would show all of the children [...]
Categories: front-end development, javascript, jquery, plugins |
Tags: jquery | 3 Comments »
December 10, 2007
Ever wish you could use jQuery on a page at the drop of a hat, without having access to the page itself? Well I’ll be damned, you can.
(This is one of those things that in hindsight seems so painfully obvious that I’m almost embarrassed to admit that it never occurred to me, but admit it [...]
Categories: front-end development, javascript, jquery |
Tags: bookmarklet, jquery | No Comments »
« Previous Entries Next Entries »