how to call jQuery fadeIn() and fadeOut() on a rich:popupPanel
robertwalker Dec 28, 2011 11:28 PMHi all, i was hoping there was a way to call jQuery's fadeIn() instead of the javascript api show()
I am currently using this code, but would like to replace javascript show() with a jquery fadeIn()
I am stumbling around trying to get this to work , reading Ilya's PR4 book and wonder if anyone had some suggestions
here is my code that works but without the jQuery fadeIn()
(would like to use fadeOut() also to close the rich:popupPanel)
<a4j:commandLink id="deleteBtnId" onclick="#{rich:component('confirmationDlg')}.show();return false" >
<rich:dataTable id="table" value="#{controller.list}" var="ithData"> . . <rich:column> .. <a4j:commandLink id="deleteBtnId" onclick="#{rich:component('confirmationDlg')}.show();return false" /> <a4j:jsFunction name="deleteDataById" actionListener="#{controller.deleteById(ithData.id)}" /> <rich:popupPanel id="confirmationDlg" modal="true"> <h:outputText value="Are you sure you want to delete the data?" /> <!-- delete data if 'Delete' is clicked, and remove rich:popupPanel, want to use jQuery fadeOut()--> <h:commandButton value="Delete" onclick="#{rich:component('confirmationDlg')}.hide(); deleteDataById(); return false" /> <!-- no delete, remove rich:popupPanel want to use jQuery fadeOut() --> <h:commandButton value="Cancel" onclick="#{rich:component('confirmationDlg')}.hide();return false" /> </rich:popupPanel>
I was thinking something like this might work for the showing/fadeIn of the rich:popupPanel
<a4j:commandLink id="deleteBtnId" /> <rich:jQuery selector="#deleteBtnId" query="click(function(){ jQuery('#confirmationDlg').fadeIn();return false; })" />
I also tried
<a4j:commandLink id="deleteBtnId" /> <rich:jQuery selector="#deleteBtnId" event="click" query="jQuery('#confirmationDlg').fadeIn();return false;" />
can someone point me to an exampe or point me in the right direction
thanks