I am developing a JSF Custom Component, using the information I found on the following book Pro JSF and HTML5 by Apress.
So far, I successfully developed:
You can include into the facelets wich uses your component an external javascript file by adding the following code:
Within the component when you generate the XHTML output give an Id to your menu entries e.g.
and in yourjs.js
$(document).ready(function() {
$("#myid").click(function(){
// dostuff
});
});