Log In | Users | Register
Welcome, Registration, and other StartingPoints; Foswiki history & Wiki style; All the docs...
spacer
Edit | Attach | New | Raw | Delete | History | Diff | Print | Pdf | Subscribe | Tools
You are here: System » JQueryPlugin » JQueryLiveQuery

JQueryLiveQuery

Homepage: http://docs.jquery.com/Plugins/livequery
Author(s): Brandon Aaron
Version: 1.0.3

Live Query utilizes the power of jQuery selectors by binding events or firing callbacks for matched elements auto-magically, even after the page has been loaded and the DOM updated.

Example

First

This tab is loaded on page load. The second and third will be reloaded using ajax. livequery will make sure that the jQuery elements inside are initialized correctly as soon as they are added to the DOM tree.

Second

 
%STARTSECTION{"second"}%
This button has been loaded async-ly 

%BUTTON{"Hello" icon="emoticon_smile" onclick="alert('The callback for this button was properly initialized')"}%
%CLEAR%

Click on the button to see if it is properly initialized.
%ENDSECTION{"second"}%

Third

 

%STARTSECTION{"third"}%
<verbatim class="html">
<body>
  <h1 style="border-bottom:1px solid #eee">Hello world</h1>

  <strong>If this is coloured, then livequery worked out fine.</strong>
</body>
</verbatim>
%ENDSECTION{"third"}%
spacer
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback
Syndicate this site RSS ATOM