Sat, Apr 25, 2009
I have just launched a new version of my wife's site Design By Kate, now instead of being her design portfolio it has been transformed into a business selling unique baby and kids wall art either on canvas or art bloc which are a cheaper alternative but still look great!
The design was all Kate and I built the site using html & css then I created a basic shopping cart with php and integrated it with PayPal so that all the transactions are... more
Thu, Nov 20, 2008
I posted a couple of tips on my site Guitar Noize to help any of you Expression Engine users out there optimize your templates, make sure you also read the comment from Ovidiu which I have also implemented having realised I had been a bit slap happy with my original template:
http://www.guitarnoize.com/blog/comments/google-seo-tips-for-expression-engine/

Wed, Jun 18, 2008
I was just using jQuery in an application I'm building to clone a table row which includes a couple of select elements which are preselected when the page loads. Now when I clone the row I want a clean sheet so both selects need to be reset and the input needs to be cleared too. The input is easy, you simple reference the input and set val(""). In my example I store the cloned row in a variable called newTR and then find the input that I want to clear like so:
$(newTR).find('.hours').val("");
However I was trying to reset the select elements like this:
$(newTR).find('.sel_projects').selectedIndex = -1;
This wasn't showing an errors in Firebug, it simply wasn't working. After a bit of research I found the answer. Due to jQuery's chaining mechanism you need to use either the get() method or reference the jQuery object by it's array shortcut to get to the actual DOM element. Like this:
$(newTR).find('.sel_projects').get(0).selectedIndex = -1;
OR
$(newTR).find('.sel_projects')[0].selectedIndex = -1;
Easy when you know how!