jump to navigation

NOTE: The spam filter is being unusually aggressive. If you comment does not immediately appear, it has simply been placed in moderation and I will approve it as quickly as possible. Thank you for your patience.

"Murphy was an optimist!"

jQuery roadblock August 12, 2010 6:33 pm

Posted by Doug McCaughan in : JavaScript, jQuery, Programming, Technology
, add a comment

jQuery problem:

<table>
<tr><td>one</td><td>two</td><td>three</td><td><a class=”foo” href=””>click me first</a></td></tr>
<tr><td>one</td><td>two</td><td>three</td><td><a class=”bar” href=””>click me second</a></td></tr>
</table>

What jQuery would allow me to click on "click me second" and change the color of the text "click me first"?

It’s a little more complicated than that. The real source has a plus image on the first row. Once you click that I use .hide() to make the plus go away. I create the 2nd row which has a minus image and a plus image. If you click the plus image, it disappears and creates a third row. The minus image, should 1st) cause the immediate plus image above it to appear 2) then disappear its own row. All plus images have a class of "addrow" and minus images have a class of "deleterow" I thought prev() would be doing it but I get nothing. Specifically .prev(‘.addrow’).show();

add a comment

Simplifying Code August 11, 2010 9:55 pm

Posted by Doug McCaughan in : ColdFusion, Programming, Technology
, 2comments

Often I run across code like this:


<cfif ArrayIsEmpty(Cart.Products)>
     <cfset HasCart = False>
<cfelse>
     <cfset HasCart = True>
</cfif>

Frankly, that makes me twitch a little. This has the same result:


<cfset HasCart = NOT ArrayIsEmpty(Cart.Products)>

2comments

Deep Thought August 11, 2010 12:08 pm

Posted by Doug McCaughan in : Deep Thoughts, Philosophy
, add a comment

If my head explodes, who will clean up the mess?

add a comment

See that mountain over there? One of these days… August 9, 2010 9:27 am

Posted by Doug McCaughan in : Daily Life, Family
, add a comment

Smoky Mountains

We have these astounding mountains in our backyard. A mere 45 minute drive deposits us in a little peace of Heaven. This past Saturday we took a day with the family and visiting relatives to enjoy nature and splash in the stream at the Chimney Tops picnic area. It was a fantastic day! See Cathy’s pictures.

add a comment

Pivotal August 4, 2010 12:46 pm

Posted by Doug McCaughan in : Daily Life, Health
, 3comments

I supposed yesterday was what some would deem a wake up call. And today, I am changed.

3comments

False assertion? August 1, 2010 10:02 am

Posted by Doug McCaughan in : Daily Life
, 5comments

True or false? The context is that all my offsite work is tied to an antique desktop computer at my house.

If I buy a Macbook Pro my productivity will increase and I will develop iPhone apps.

5comments