configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, "false"); Make your application use Prototype and the default tapestry.js with jQuery in no-conflict mode but in this case $ is the shortcut for Prototype.
That's why your code is not working. in this "backward compatibility" mode you can use the alias $ for jQuery inside a closure like (function( $ ) { $(document).ready(function(){ alert("ok"); }); }) ( jQuery ); more detail at http://docs.jquery.com/Using_jQuery_with_Other_Libraries#Referencing_Magic_-_Shortcuts_for_jQuery or define a alias for jQuery see http://api.jquery.com/jQuery.noConflict/ that's what you have done with configuration.add(JQuerySymbolConstants.JQUERY_ALIAS, "$j"); but you must write $j(document).ready(function(){ $j("#showid").click(function(){ $j("#pelement").show(); }); $j("#hideid").click(function(){ $j("#pelement").hide(); }); }); for me closure is better, that how our components are defined see for example. https://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/jquery/assets/components/palette/palette.js If you want use a pure jquery stack and assign $ to jQuery remove configuration.add(JQuerySymbolConstants.JQUERY_ALIAS, "$j"); configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, "false"); from your AppModule but in this case, you will have to use jquery/autocomplete instead of autocomplete and jquery/palette instead of palette 2012/1/3 csckid <testnowsh...@gmail.com>: > I wrote this two lines in the Appmodule > configuration.add(JQuerySymbolConstants.JQUERY_ALIAS, "$j"); > configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, "false"); > > Now everything is working i.e. autocomplete mixin, jquery/tooltip, tapestry > validation, > (function( $ ) { > $(document).ready(function(){ > alert("ok"); > }); > }) ( jQuery ); > > Only the simple jquery code isn't working > $(document).ready(function(){ > $("#showid").click(function(){ > $("#pelement").show(); > }); > $("#hideid").click(function(){ > $("#pelement").hide(); > }); > }); > Error: $(document).ready is not a function > Source File: http://localhost:8080/medical/about > Line: 29 > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/jquery-tp5113334p5117610.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org