# jQuery in der 5.3 RC1

**URL:** <https://forum.shopware.com/t/jquery-in-der-5-3-rc1/46365>\
**Category:** Programmierung\
**Created:** [16. Juni 2017 um 09:11 UTC](https://forum.shopware.com/t/jquery-in-der-5-3-rc1/46365 "2017-06-16T09:11:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluewolf](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/bluewolf/32/7886_2.png) [@bluewolf](https://forum.shopware.com/u/bluewolf)\
**Post date:** [16. Juni 2017 um 09:11 UTC](https://forum.shopware.com/t/jquery-in-der-5-3-rc1/46365/1 "2017-06-16T09:11:41Z")

</div>

Moin,

im RC1 mit dem asynchronen Javascript Einstellungen funktionieren meine Aufrufe nicht mehr, obwohl die jquery-Plugins sauber eingebunden werden.

Folgendes läuft ohne asynchrones Laden:

```
         $(document).ready(function(){
         $(".navigation-main").sticky( { topSpacing:0 } );
           });

```

Mit asynchonrm Nachladen:

```
Uncaught ReferenceError: $ is not defined

```

Die Upgrade Doku hilft mir da nicht weiter. Hat jemand einen Tipp?

Gruß  
Matthias  
&nbsp;

---

<div class="post-metadata">

**Author:** ![EikeBrandtWarneke](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EikeBrandtWarneke](https://forum.shopware.com/u/EikeBrandtWarneke)\
**Post date:** [16. Juni 2017 um 09:14 UTC](https://forum.shopware.com/t/jquery-in-der-5-3-rc1/46365/2 "2017-06-16T09:14:35Z")

</div>

Siehe:&nbsp;[Shopware 5 upgrade guide](https://developers.shopware.com/developers-guide/shopware-5-upgrade-guide-for-developers/#asynchronous-javascript)

Viele Grüße

---

<div class="post-metadata">

**Author:** ![bluewolf](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/bluewolf/32/7886_2.png) [@bluewolf](https://forum.shopware.com/u/bluewolf)\
**Post date:** [19. Juni 2017 um 06:49 UTC](https://forum.shopware.com/t/jquery-in-der-5-3-rc1/46365/3 "2017-06-19T06:49:42Z")

</div>

Jo, danke. Nun hat´s klick gemacht…

---

<div class="post-metadata">

**Author:** ![derwunner](https://avatars.discourse-cdn.com/v4/letter/d/e5b9ba/32.png) [@derwunner](https://forum.shopware.com/u/derwunner)\
**Post date:** [20. Juni 2017 um 06:17 UTC](https://forum.shopware.com/t/jquery-in-der-5-3-rc1/46365/4 "2017-06-20T06:17:22Z")

</div>

> [@Aquatuning GmbH schrieb:](https://forum.shopware.com/profile/11752/Aquatuning%20GmbH "Aquatuning%20GmbH")
> 
> Siehe:&nbsp;[https://developers.shopware.com/developers-guide/shopware-5-upgrade-guide-for-developers/#asynchronous-javascript](https://developers.shopware.com/developers-guide/shopware-5-upgrade-guide-for-developers/#asynchronous-javascript)
> 
> Viele Grüße

Hallo, eine Frage, die mich als Mitleser interessiert: Funktioniert das auch außerhalb von Shopware? Wenn nicht, was wäre nötig, um sich soetwas selber zu bauen?&nbsp;

---

<div class="post-metadata">

**Author:** ![EikeBrandtWarneke](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EikeBrandtWarneke](https://forum.shopware.com/u/EikeBrandtWarneke)\
**Post date:** [20. Juni 2017 um 07:33 UTC](https://forum.shopware.com/t/jquery-in-der-5-3-rc1/46365/5 "2017-06-20T07:33:02Z")

</div>

Schau dir einfach an, wie es Shopware gelöst hat.&nbsp;  
Siehe:&nbsp;[GitHub - shopware/shopware: Shopware 5 Repository - For Shopware 6 visit https://github.com/shopware/platform](https://github.com/shopware/shopware)

Viele Grüße

---

<div class="post-metadata">

**Author:** ![Patrick\_Stahl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/patrick_stahl/32/7679_2.png) [@Patrick\_Stahl](https://forum.shopware.com/u/Patrick_Stahl)\
**Post date:** [20. Juni 2017 um 14:34 UTC](https://forum.shopware.com/t/jquery-in-der-5-3-rc1/46365/6 "2017-06-20T14:34:41Z")

</div>

> [@derwunner schrieb:](https://forum.shopware.com/profile/25468/derwunner "derwunner")
> 
> > [@Aquatuning GmbH schrieb:](https://forum.shopware.com/profile/11752/Aquatuning%20GmbH "Aquatuning%20GmbH")
> > 
> > Siehe:&nbsp;[https://developers.shopware.com/developers-guide/shopware-5-upgrade-guide-for-developers/#asynchronous-javascript](https://developers.shopware.com/developers-guide/shopware-5-upgrade-guide-for-developers/#asynchronous-javascript)
> > 
> > Viele Grüße
> 
> Hallo, eine Frage, die mich als Mitleser interessiert: Funktioniert das auch außerhalb von Shopware? Wenn nicht, was wäre nötig, um sich soetwas selber zu bauen?&nbsp;

Moin!

Was genau meinst du?  
Wie man sich eine solche Funktion selbst baut?  
Das kannst du dir hier anschauen:

[https://github.com/shopware/shopware/blob/5.3/themes/Frontend/Bare/frontend/index/script-async-ready.tpl](https://github.com/shopware/shopware/blob/5.3/themes/Frontend/Bare/frontend/index/script-async-ready.tpl)  
Das basiert jetzt halt darauf, dass ein einzelnes Javascript-Script mit einer vorgegebenen ID „main-script“ existiert.

Das ist aber auch nur notwendig, wenn du deine Javascript-Dateien asynchron laden willst, wie bspw. hier:  
[https://github.com/shopware/shopware/blob/5.3/themes/Frontend/Bare/frontend/index/index.tpl#L245](https://github.com/shopware/shopware/blob/5.3/themes/Frontend/Bare/frontend/index/index.tpl#L245)

&nbsp;Hilft dir das weiter?

Gruß,  
Patrick&nbsp; ![Shopware](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "Shopware")
