That's means that jQuery itself is not available when you need it (ie:
$('#accordion'))
Still using firebug, check whether libraries are well added to the page (ie
you don't have a 404 instead of the file content)
Furthermore it is not a good practice to include jquery.js by yourself
using this manner, it may conflict with the wicket's shipped one.
If you need to have a custom version of jQuery, see Application#init() {
this.getJavaScriptLibrarySettings().setJQueryReference(myJQueryReference) }
and later use
MyApplication.get().getJavaScriptLibrarySettings().getJQueryReference() (if
you are not using JQueryPluginResourceReference)
To complete the loop, it is better to use PriorityHeaderItem for adding
these references to be sure these will be rendered before your call...
Best regards,
Sebastien.
On Wed, Feb 18, 2015 at 2:35 PM, avchavan <[email protected]>
wrote:
> Used firebug.
> I get the following error:
>
> ReferenceError: $ is not defined
>
> @Override
> public void renderHead(IHeaderResponse response) {
> // add jQuery library
>
> response.render(CssHeaderItem.forUrl("
> https://code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css"));
>
> response.render(JavaScriptHeaderItem.forUrl("
> https://code.jquery.com/jquery-1.10.2.js"));
>
> response.render(JavaScriptHeaderItem.forUrl("
> https://code.jquery.com/ui/1.11.3/jquery-ui.js"));
>
>
> response.render(JavaScriptHeaderItem.forScript("$('#accordion').accordion();","onready-master"));
> }
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Jquery-methods-issue-with-wicket-6-13-tp4669599p4669608.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>