0 Replies Latest reply on Jan 27, 2012 11:58 AM by B Singh

    Use jQuery with richfaces

    B Singh Newbie

      Hi,

       

      I'm using  jQuery with richfaces 3.3.2, and I have noticed some odd behaviour with selectors.

       

      For example I have a richfaces datascroller in a div :-

       

      <div class="codeExceptionScroller" id="scrollerDiv">

      <span xmlns="http://www.w3.org/1999/xhtml" id="exceptionMgt1:pooledData1op">

       

      This jQuery works:

      jQuery('#scrollerDiv').click(function() {

               // do stuff when clicked

              alert('Clicked');

       

           });

       

      But for following html div:

       

      <div class="rich-datascr " id="exceptionMgt1:pooledData1scroller" style=" " align="center">

       

      This jQuery DOES NOT work:

      jQuery('#exceptionMgt1\\:pooledData1scroller').click(function() {

               // do stuff when clicked

              alert('Clicked');

       

           });

       

      Also the following works in IE8 but not Chrome or Firefox:

       

      <script type="text/javascript">

      jQuery(document).ready(function() {

      //document fully loaded

               alert('document fully loaded');

       

           });

      </script>

       

      Are there good guidelines for selectors when using richfaces.

       

      Thanks in advance.