I tried your suggestion and I found that the livequery function binds without being in the ready event.
However, on this page, #loginlink binding is inside the ready event. http://highfallsfoodcoop.com And on this page I moved it out of the ready event http://highfallsfoodcoop.com/test.php On the second page I get this error on loading: Error: $("#loginlink").livequery is not a function Source File: http://highfallsfoodcoop.com/test1.js Line: 138 Why am I getting this error when I load the second page? On May 2, 6:28 am, Abrar Arshad <abrar.apt...@gmail.com> wrote: > hi, > what i understood from your explanation is that you expect from > livequery() method not to trigger any event on load event of the page. Well > first of all, livequery() also handles those elements which are not present > initially when the page is loaded for the first time, so that behavior > suggests users not to use it in the ready() event of the document. It works > on the fly. > > you can use it with the form when it is going to be submitted > > $(function(){ > $("#myForm").livequery('submit',function(){ > // do your stuff here > }); > > }) > On Sat, May 2, 2009 at 1:56 AM, rodeored <in...@reenie.org> wrote: > > > This page:http://reenie.org/jquery/ > > is linked to 1.js which has this code: > > > $(document).ready(function(){ > > $('#myForm').livequery(function(){ > > alert('why is this happening?'); > > return false; > > }); > > > }); > > > When the page is first loaded, it triggers the alert. It doesn't seem > > like it would because it is in the livequery function. Why does it do > > that?