RichFaces includes jQuery JavaScript framework. You can use the futures of jQuery directly without defining the component on a page if it is convenient for you. To start using the jQuery feature on the page, include the library into a page with the following code:
<a4j:loadScript src="resource://jquery.js"/>
In order to test jQuery on your page
Add the following to the <body>
:
<a href="">Link</a>
Add the following to the page
:
<script type="text/javascript"> jQuery(document).ready(function() { jQuery("a").click(function() { alert("Hello world!"); }); }); </script>
- Remember to use
jQuery()
function instead of$()
then just click the “Link”
Leave a comment