Along with dom traversal (ala CSS2), you can also use CSS2 and CSS3 selectors in jQuery. For example:
lb = $('a[rel="lightbox"]‘);
will get you all the anchor elements in the dom which have the rel="lightbox" attribute. This, however:
lb = $('a[rel*="light"]‘);
will get you all the anchor elements in the dom which have the substring “light” in their rel attribute.
Categories: (x)HTML
Unfortunately, things don’t always render the same across all browsers (never have, likely never will). If, for some reason, you need to tweak things only in Opera 8 and 9, this CSS will do the trick:
Not my genius, but I can’t recall where I first found this so I can’t quote the source unfortunately.
/* target Opera */
@media all and (min-width:0px) {
/* target version 9 */
head~body #yui-main p {font-size: 130%;}
/* target version 8 */
body #yui-main p{font-size: 130%;}
}
Categories: CSS · general web
I’m a Mormon. Actually, I’m officially a member of ‘The Church of Jesus Christ of Latter-Day Saints‘.
I joined the church around 12 years ago, at the age of 19, so I’ve a good idea of what it’s like to live both inside and outside “the church” (for want of a better term).
Anything you’ve ever wanted to ask a Mormon but had neither the courage or the opportunity? Ask away - leave a comment and I’ll do my best to reply. I promise to be reasonable
Go on, I dare you…
Categories: (x)HTML
Tagged: church of jesus christ of latter-day saints, mormon
- roll out the new standards-compliant, jQuery navigation to a large section of the site (my work site, not this one)
- complete all my freelance work
- validate my code. I promise
- rent a DVD and actually watch it for a change
- get mod_rewrite voodoo working properly on my dev machine (tips welcome)
- focus more on enjoying what I do
- help the kids learn what ANZAC Day really is
- skateboard (even if it’s a bit wet)
- write to my grandmother
- hold myself to this list
Categories: (x)HTML
Sometimes when I’m tired, or in the middle of a project I don’t enjoy I get a bit down. Today has been like 5 of those small ‘down’ times combined. I can’t get into my work, I’m finding it hard to feel positive (unusual for me) and I’m feeling pretty unfulfilled with my professional life in general.
After a short walk, prayer and some thought I realised what I’m lacking: vision.
I’ve been involved recently (outside of work) in leading a group to develop a vision statement along with a set of values and goals used to measure progress towards this vision.
Traditionally, this group has been led by people who lacked clear direction, or who led in a more dictatorial (although well-meaning) fashion.
The entire process has been incredibly energising - people finally got a say into what the future of the organisation should look like, and we’re now going from a rather bland, dull and unexciting place to one where the leaders feel involved. Not only this, now we also know:
- where we’re going
- what we need to do to get there
- how to measure our progress.
You may think of this type of thing as complete rubbish, but I’ve seen it literally transform an organisation.
Ironically I haven’t applied it to my personal life, as I’m ‘too busy’ (sound familiar?), but where else is could clear vision, values and goals be more important for me.
Life without vision, values and goals is what I’ve found it to be today - empty.
Categories: the uncertain future
Tagged: goals, it-really-is-up-to-you, motiviation, vision
Join tutorials always tell you how to join tables in the same database, but what if you need to join tables which sit in different databases?
Turns out this is nice and simple[1] (in MySQL, your db engine may vary):
SELECT this-db.table-one.column-one, other-db.table-two.column-two
FROM this-db.table-one
LEFT JOIN other-db.table-two
ON this-db.table-one.id = other-db.table-two.id
Simply put, the ‘dot operator’ lets you specify database as a parent of table in the same way you normally specify table as a parent to a column.
[1] assuming the account you use to connect to the database has rights across both databases. If not you’ll need to set up an account which does.
Categories: SQL
We’re planning on upgrading from an archaic mysql engine (3.5
to the latest, shiny release version (5.1), so I’ve undertaking a code review of some of our administration applications to see what this unearthed.
Turns out the password hashing for the MySQL native PASSWORD() function changed in version 4.1, so our login system won’t work in 5.1. Great.
Turns out we’ll be able to skirt around this by making sdure this line is in the new my.cnf file:
old-passwords = 1
It’s great this was thought of, as PASSWORD() is a one-way, irreversible function, so authentication will fail for any old application using it when it is run on mysql >= 4.1.
thanks to [ducea.com]
Categories: (x)HTML
I’ve worked on a project where I used WordPress as a CMS for a (non-blog) content-driven site and was impressed by how flexible it was. I did cheat however and skirted around having to create an entire theme by creating simple PHP pages and pulling the data out using the post ID, as I thought WordPress wouldn’t function as well as a content site when using a theme.
Way wrong. I’m looking forward to using WordPress again, but properly using some of the ifnormation in the following links:
Categories: frameworks · general web · web applications
Tagged: blog hacks, content-management doesn't have to suck, wordpress
ReadWriteWeb wrote up a while ago about Firefox 3 adding offline support for web applications. Arouind the same time, the Google Gears announcement came out and kind of fizzled. (Anyone using Google Gears? Anyone?)
I put this aside but recently discovered that companies are investing time and money into creating offline version of online web apps and using web app API’s to maintain data consistency. Take this offline front end for basecamp as an example.
Forgive me here, but isn’t connection to the internet becoming MORE pervasive every year. We now have not only desktop PC’s accessing and modifying information on the the internet, we have laptops, mobile phones, net-enabled devices and even ambient devices. The future is kind of banking on increased access to ‘the cloud’ in order for everything to tie together.
If today was 10 years ago, then this would make sense, but offline applications simply make no sense to me. If you feel the need for offline apps it seems you need to ask yourself why. If it’s a connection quality issue then it’s your connection which needs dealing with. If it’s commuting then surely there are far simpler tools you probably already have (text editor, word processor) which can perform the same basic functions until you’re online again.
If it’s about using the browser as platform, that’s been happening with Mozilla and Firefox for years via XUL and the Mozilla development engine products like Komodo use to get cross-platform applications functioning much easier.
The only reason I see for this development (especially in Firefox 3) is so Google can add simple offline support to it’s office suite in order to remove one more Enterprise excuse, but it still confounds me that time and energy is being sunk into offline support.
I’ll wait patiently to be educated..
Categories: the uncertain future · web applications

Lets see, boring Australians, boring eBay, boring movies or boring DVD’s. Choices, choices…
As seen on this domain squatting site.
Categories: (x)HTML