Fancybox is a really nice jQuery library for creating lightboxes. There are a few simple examples and some documentation on their site but there seems to be no demonstrated method for loading a fancybox dynamically with javascript. All of their examples require you to embed a link to the lightbox content somewhere in the page [...]
Archive for the ‘javascript’ Category
3 Aug
Starting Out With Comet (Orbited) Part 3 – The Client
Comet implementations require both server and client side components. In Part 2 of this series we installed and configured the server side component and then used the example STOMP Test client to test it out and get a feel for what was going on. In this part of the series we’ll be covering the client [...]
3 Jun
Find RSS Feed Links With jQuery
This took me a little while to figure out so I thought I’d share. You can use a jQuery selector to find any RSS links on a page very easily. The following line will return a list of the RSS link elements. The following snippet will create an array of all the urls to the [...]
2 Jun
TicTacToe in jQuery
As a demo application for a project of mine I wrote TicTacToe in Javascript using the jQuery framework. I’ve added excessive comments to the code to provide an easy walk-through example on the jQuery/Javascript game. I’m in no way a JavaScript expert, there are a hundred different ways to program TicTacToe, and this code is [...]
19 Jan
Javascript Relative and Absolute URLs
I recently discovered a small oddity in javascript link elements. Simply stated, if you access the ‘href’ attribute using getAttribute(‘href’) the result will be different than accessing it with simply ‘href’. The getAttribute will return the relative link, where the direct call will return the absolute. Here’s the test: <html> <body > <a href=”/relative/link” [...]
17 Jan
Executed In Sequence of Page Load
I was researching some javascript capabilities earlier and from a wikipedia article on Comet learned this “browsers render HTML pages incrementally, each script tag is executed as it is received.“ Awesome! This means not just that you can execute javascript before and as the page is loading, but you choose WHEN/WHERE to run it. To test it [...]