Re: jQuery.noConflict() not working
Try to visit these site: http://docs.jquery.com/Using_jQuery_with_Other_Libraries It can help a lot. Inge Solvoll-2 wrote: Nice, thanks! It actually worked putting jquery-core.js before all other scripts. It is strange, because I have a Struts page with a very similar setup, both prototype and jQuery included and prototype first, and it has no errors in IE8... Thiago: I'm also using a jQuery plugin (jQuery UI datepicker). But my plugin works nicely without any $ replacements. Thanks again for great help! Inge On Thu, Nov 26, 2009 at 5:07 PM, Jim O'Callaghan jc1000...@yahoo.co.ukwrote: I see there's another response already that may indicate the problem lies elsewhere but just in case you do want to reorder the included files ... ... can you contribute and use a custom ClientInfrastructure containing a list for the javascriptStack, add jQuery.js first to your list, and then add the existing clientInfrastructure javascriptStack? I used a variation of this solution from elsewhere on the mailing list to get around a blackbird issue I was having. ... in AppModule ... public ClientInfrastructure decorateClientInfrastructure(ClientInfrastructure original) { return new MyClientInfrastructure(original); } ... MyClientInfrastructure.java (untested so probably some syntax errors) ... public class MyClientInfrastructure implements ClientInfrastructure { ClientInfrastructure clientInfrastructure; List javascriptStack = new ArrayList(); public MyClientInfrastructure(ClientInfrastructure clientInfrastructure) { this.clientInfrastructure = clientInfrastructure; javascriptStack.add(asset for jQuery); javascriptStack.addAll(this.clientInfrastructure.getJavascriptSt ack()); } public ListAsset getJavascriptStack() { return javascriptStack; } public ListAsset getStylesheetStack() { return clientInfrastructure.getStylesheetStack(); } HTH. Regards, Jim. -Original Message- From: Inge Solvoll [mailto:inge.tapes...@gmail.com] Sent: 26 November 2009 15:42 To: Tapestry users Subject: jQuery.noConflict() not working Hi! Sorry for going a little bit OT here, but this is kinda T5-specific too. I'm trying to use jQuery together with prototype in T5. It works nicely in firefox, but in IE8, I get a lot of object not supported, line 4821 and so on. If I remove the reference to jQuery, everything works again. I did include a call to jQuery.noConflict() a the end of the jQuery js-file. I'm guessing that it would work including jQuery BEFORE prototype, as prototype would overwrite everything that's been done by jQuery, and jQuery doesn't have a problem with that, using a different alias instead. Does anyone have nice approach for making T5 include jQjery.js before prototype.js? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://old.nabble.com/jQuery.noConflict%28%29-not-working-tp26531246p26601658.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
Re: jQuery.noConflict() not working
Nice, thanks! It actually worked putting jquery-core.js before all other scripts. It is strange, because I have a Struts page with a very similar setup, both prototype and jQuery included and prototype first, and it has no errors in IE8... Thiago: I'm also using a jQuery plugin (jQuery UI datepicker). But my plugin works nicely without any $ replacements. Thanks again for great help! Inge On Thu, Nov 26, 2009 at 5:07 PM, Jim O'Callaghan jc1000...@yahoo.co.ukwrote: I see there's another response already that may indicate the problem lies elsewhere but just in case you do want to reorder the included files ... ... can you contribute and use a custom ClientInfrastructure containing a list for the javascriptStack, add jQuery.js first to your list, and then add the existing clientInfrastructure javascriptStack? I used a variation of this solution from elsewhere on the mailing list to get around a blackbird issue I was having. ... in AppModule ... public ClientInfrastructure decorateClientInfrastructure(ClientInfrastructure original) { return new MyClientInfrastructure(original); } ... MyClientInfrastructure.java (untested so probably some syntax errors) ... public class MyClientInfrastructure implements ClientInfrastructure { ClientInfrastructure clientInfrastructure; List javascriptStack = new ArrayList(); public MyClientInfrastructure(ClientInfrastructure clientInfrastructure) { this.clientInfrastructure = clientInfrastructure; javascriptStack.add(asset for jQuery); javascriptStack.addAll(this.clientInfrastructure.getJavascriptSt ack()); } public ListAsset getJavascriptStack() { return javascriptStack; } public ListAsset getStylesheetStack() { return clientInfrastructure.getStylesheetStack(); } HTH. Regards, Jim. -Original Message- From: Inge Solvoll [mailto:inge.tapes...@gmail.com] Sent: 26 November 2009 15:42 To: Tapestry users Subject: jQuery.noConflict() not working Hi! Sorry for going a little bit OT here, but this is kinda T5-specific too. I'm trying to use jQuery together with prototype in T5. It works nicely in firefox, but in IE8, I get a lot of object not supported, line 4821 and so on. If I remove the reference to jQuery, everything works again. I did include a call to jQuery.noConflict() a the end of the jQuery js-file. I'm guessing that it would work including jQuery BEFORE prototype, as prototype would overwrite everything that's been done by jQuery, and jQuery doesn't have a problem with that, using a different alias instead. Does anyone have nice approach for making T5 include jQjery.js before prototype.js? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: jQuery.noConflict() not working
Em Thu, 26 Nov 2009 13:42:14 -0200, Inge Solvoll inge.tapes...@gmail.com escreveu: Hi! Hello! I'm trying to use jQuery together with prototype in T5. It works nicely in firefox, but in IE8, I get a lot of object not supported, line 4821 and so on. If I remove the reference to jQuery, everything works again. I did include a call to jQuery.noConflict() a the end of the jQuery js-file. I have a page that uses a jQuery color picker plugin and tested it in IE 7 and 8 without problem. jQuery is added after Prototype. Besides jQuery.noConflict(), I just needed to replace the plugin's $() usages for $jQuery(). -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: jQuery.noConflict() not working
I see there's another response already that may indicate the problem lies elsewhere but just in case you do want to reorder the included files ... ... can you contribute and use a custom ClientInfrastructure containing a list for the javascriptStack, add jQuery.js first to your list, and then add the existing clientInfrastructure javascriptStack? I used a variation of this solution from elsewhere on the mailing list to get around a blackbird issue I was having. ... in AppModule ... public ClientInfrastructure decorateClientInfrastructure(ClientInfrastructure original) { return new MyClientInfrastructure(original); } ... MyClientInfrastructure.java (untested so probably some syntax errors) ... public class MyClientInfrastructure implements ClientInfrastructure { ClientInfrastructure clientInfrastructure; List javascriptStack = new ArrayList(); public MyClientInfrastructure(ClientInfrastructure clientInfrastructure) { this.clientInfrastructure = clientInfrastructure; javascriptStack.add(asset for jQuery); javascriptStack.addAll(this.clientInfrastructure.getJavascriptSt ack()); } public ListAsset getJavascriptStack() { return javascriptStack; } public ListAsset getStylesheetStack() { return clientInfrastructure.getStylesheetStack(); } HTH. Regards, Jim. -Original Message- From: Inge Solvoll [mailto:inge.tapes...@gmail.com] Sent: 26 November 2009 15:42 To: Tapestry users Subject: jQuery.noConflict() not working Hi! Sorry for going a little bit OT here, but this is kinda T5-specific too. I'm trying to use jQuery together with prototype in T5. It works nicely in firefox, but in IE8, I get a lot of object not supported, line 4821 and so on. If I remove the reference to jQuery, everything works again. I did include a call to jQuery.noConflict() a the end of the jQuery js-file. I'm guessing that it would work including jQuery BEFORE prototype, as prototype would overwrite everything that's been done by jQuery, and jQuery doesn't have a problem with that, using a different alias instead. Does anyone have nice approach for making T5 include jQjery.js before prototype.js? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org