3 Replies Latest reply on Nov 25, 2008 10:28 AM by Vladimir Kovalyuk

    a4j:loadScript and rich:jquery

    nimo stephan Master

      I have a few questions about using jquery with prototype in richfaces:

      Question A:
      Which way should I use, to insert the jquery-script?

      This way?
      <a4j:loadScript src="resource:///org/richfaces/renderkit/html/scripts/jquery/jquery.js" />

      or that way?
      http://docs.jquery.com/Using_jQuery_with_Other_Libraries

      Question B:
      When I use the way with a4j:loadScript, what about the $? Can I use $ for both, prototype and jquery? Or is there another identifier for jquery?

      Question C:
      When I use <rich:jQuery>, do I need to load the jquery-script via the ways described above or is the script automatically when using rich:jquery?

      Question D:
      When appliying a query-string in rich:jquery via the property 'query', can I use the $ for jquery?

      Question E:
      What about loading plugins for jquery, these plugins uses $. How can I handle that? Should I overwrite $ in all jquery-plugins or can I load it via a4j:loadScript without conflicts?

      Question F:
      Would it be not better to replace all prototype-scripts in richfaces via jquery-scripts in future? It seems, that jquery strikes prototype in many ways (for example, more plugins, smaller size, shorter ways and so on..). Dont you think so?