On Mon, Jan 31, 2011 at 6:28 PM, Hector Virgen <[email protected]> wrote:
> > Damn. As a high-level userland freeloader I have been loving the
> convenience
> > of doing what seems kind of like time travel --
> > $this->JQuery()->onLoadCaptureStart() -- in my views. I wonder how you
> might
> > hack up something equivalent in ZF 2.0.
>
> I use this:
>
> jQuery(function($){
> // js code goes here
> });
>
> It's regular jquery so you can place it in an external file or use
> $this->headScript()->appendScript($jscode);
>
True, but with the ZendX_JQuery helper, everything you capture in successive
calls to onLoadCaptureStart() get stuffed into the one block:
$(document).ready(function() {
// ... i.e., here
})
and I think that's more elegant that creating multiple $(document).ready()
event handlers.
--
David Mintz
http://davidmintz.org/
It ain't over:
http://www.healthcare-now.org/