9 Replies Latest reply on Apr 25, 2008 12:48 PM by Sergey Smirnov

    Help! where can i study rich:jQuery?

    a a Novice

      Help! where can i study rich:jQuery?

      I have studied "jQuery in action 2008" and can use jQuery basically.
      But i find that materials about rich:jQuery are so little!!!


      For examlple,
      If i mouseover a little icon[1], the related big image[1] should be showed at fixed position.
      If i mouseover a little icon[2], the related big image[2] should be showed at the same fixed position.

      why my code does not work?
      my code:

       <style type="text/css">
       .class4Hide{
       display:none
       }
       </style>
      
      
      <rich:jQuery selector="table#controllerTable tr td img:eq(0)" query="mouseover(function(){jQuery('#imageSwitcher img:eq(0)').addClass('class4Hide')})"/>
      <rich:jQuery selector="table#controllerTable tr td img:eq(0)" query="mouseout(function(){jQuery('#imageSwitcher img:eq(0)').removeClass('class4Hide')})"/>
      
      <rich:jQuery selector="table#controllerTable tr td img:eq(1)" query="mouseover(function(){jQuery('#imageSwitcher img:eq(1)').addClass('class4Hide')})"/>
      <rich:jQuery selector="table#controllerTable tr td img:eq(1)" query="mouseout(function(){jQuery('#imageSwitcher img:eq(1)').removeClass('class4Hide')})"/>
      
      




      This code is copied from richfaces-demo's jQuery example:
       <rich:jQuery selector="#carList tr:odd" query="addClass('odd-row')" />
       <rich:jQuery selector="#carList tr:even" query="addClass('even-row')" />
       <rich:jQuery selector="#carList tr"
       query="mouseover(function(){jQuery(this).addClass('active-row')})"/>
       <rich:jQuery selector="#carList tr"
       query="mouseout(function(){jQuery(this).removeClass('active-row')})"/>
      
      

      ~~~~~~~~this example use 'this', so it's easy to control itself.
      But i want to click little icon to control oter bigger image.



      This function is important to me!

      Please give me some tips or tell me where i can more materials about rich:jQuery.

      Thanks a lot ahead!