Archive for November 8th, 2009

I’ve been using the containable behavio(u)r in CakePHP along with the $recursive = -1 property in my models to cut down on the amount of SQL querying going on.
I needed to specify a second level recursion on one of my associated models and managed it by doing this:
12345$this->paginate[’Invoice’][’contain’] = array(
    ‘Order’ => ‘OrderedProduct’,
    [...]

If you wanted to manipulate elements you’d added to a page with jQuery after the DOM had loaded, you used to have to specify event handlers when adding them.
jQuery v1.3 has a handy new ‘live’ method. Which basically allows you to access all elements, whether present at page load or added dynamically afterward with jQuery.
jQuery [...]


top