# jQuery Fehler nach Update

**URL:** https://forum.shopware.com/t/jquery-fehler-nach-update/67144
**Category:** Allgemein
**Created:** [23. Mai 2020 um 13:30 UTC](https://forum.shopware.com/t/jquery-fehler-nach-update/67144 "2020-05-23T13:30:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![GreMo](https://avatars.discourse-cdn.com/v4/letter/g/82dd89/32.png) [@GreMo](https://forum.shopware.com/u/GreMo)
#### Post date: [23. Mai 2020 um 13:30 UTC](https://forum.shopware.com/t/jquery-fehler-nach-update/67144/1 "2020-05-23T13:30:33Z")

</div>

Hallo zusammen,

ich bekomme folgende Fehlermeldung nach Update von 5.2.6 auf 5.6.6:

Uncaught TypeError: jQuery(…).inView is not a function

für folgende Javascript:

var lastScrollTop = 0;  
&nbsp; &nbsp; window.addEventListener(“scroll”, function() {  
&nbsp; &nbsp; &nbsp; &nbsp; if(jQuery(window).width() \> 736) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (jQuery(".navigation-main").inView() == false) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // not in checkout  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (jQuery(‘body’).hasClass(‘is–ctl-checkout’) || jQuery(‘body’).hasClass(‘is–ctl-register’) || jQuery(‘body’).hasClass(‘is–ctl-account’) || jQuery(‘body’).hasClass(‘is–ctl-address’) || jQuery(‘body’).hasClass(‘is–ctl-note’))  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jQuery(".header-main").addClass(‘lll-sticky–header’);  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jQuery(".navigation-main").addClass(‘lll-sticky–navigation-main’);  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (jQuery(".steps–container")[0]) jQuery(".steps–containe").addClass(‘lll-sticky–content’);  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else jQuery(".content-main").addClass(‘lll-sticky–content’);

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jQuery(’.lll-sticky–header’).delay(200).fadeIn(400);  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jQuery(’.lll-sticky–navigation-main’).delay(200).fadeIn(400);  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var st = window.pageYOffset || document.documentElement.scrollTop;  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (st \< lastScrollTop) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (jQuery(document).scrollTop() == 0) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jQuery(".header-main").removeAttr(‘style’).removeClass(‘lll-sticky–header’);  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jQuery(".navigation-main").removeAttr(‘style’).removeClass(‘lll-sticky–navigation-main’);  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (jQuery(".steps–container")[0]) jQuery(".steps–containe").removeAttr(‘style’).removeClass(‘lll-sticky–content’);  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else jQuery(".content-main").removeAttr(‘style’).removeClass(‘lll-sticky–content’);  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lastScrollTop = st;  
&nbsp; &nbsp; &nbsp; &nbsp; }  
&nbsp; &nbsp; &nbsp; &nbsp; // phone portrait  
&nbsp; &nbsp; &nbsp; &nbsp; // if(jQuery(window).width() \< 478) {  
&nbsp; &nbsp; &nbsp; &nbsp; // &nbsp; &nbsp; jQuery(’.header-main’).css(‘height’, 210);  
&nbsp; &nbsp; &nbsp; &nbsp; // &nbsp; &nbsp; jQuery(’.main-search–form’).css(‘display’, ‘none’);  
&nbsp; &nbsp; &nbsp; &nbsp; // }  
&nbsp; &nbsp; }, false);

Ich habe das Theme nicht selbst programmiert und wäre hier dankbar für einen Gedankenanstoss oder Lösungsansätze.

Vielen Dank im Vorraus!

Mit freundlichen Grüßen

Gregor Moosbrugger

&nbsp;

---

<div class="post-metadata">

### Author: ![GreMo](https://avatars.discourse-cdn.com/v4/letter/g/82dd89/32.png) [@GreMo](https://forum.shopware.com/u/GreMo)
#### Post date: [23. Mai 2020 um 16:22 UTC](https://forum.shopware.com/t/jquery-fehler-nach-update/67144/2 "2020-05-23T16:22:39Z")

</div>

Der Fehler ist verschwunden nachedem ich die Theme.php angepasst habe von&nbsp;

&nbsp;

\<?php 

namespace Shopware\Themes\LampeLicht; use Shopware\Components\Form as Form; class Theme extends \Shopware\Components\Theme { &nbsp; &nbsp; protected $extend = 'Responsive'; &nbsp; &nbsp; protected $name = \\<\\< Lampe und Licht SHOPWARE\_EOD; &nbsp; &nbsp; protected $description = \\<\\< SHOPWARE\_EOD; &nbsp; &nbsp; protected $author = \\<\\< SHOPWARE\_EOD; &nbsp; &nbsp; protected $license = \\<\\< SHOPWARE\_EOD; &nbsp; &nbsp; public function createConfig(Form\Container\TabContainer $container) &nbsp; &nbsp; { &nbsp; &nbsp; } &nbsp;&nbsp; &nbsp;protected $javascript = [&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'src/js/ll.js', &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'src/js/jquery.change-quantity.js' &nbsp;&nbsp; &nbsp;]; } &nbsp; \*\*zu:\*\* \<?php 

namespace Shopware\Themes\LampeLicht; use Shopware\Components\Form as Form; class Theme extends \Shopware\Components\Theme { &nbsp; &nbsp; protected $extend = 'Responsive'; &nbsp;&nbsp; &nbsp;protected $name = 'Lampe und Licht'; &nbsp;&nbsp; &nbsp;protected $description = 'SW 5.6.6. ready'; &nbsp;&nbsp; &nbsp;protected $author = 'arboro, GM'; &nbsp;&nbsp; &nbsp;protected $license = ''; &nbsp;&nbsp; &nbsp;protected $javascript = [&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'src/js/ll.js', &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'src/js/jquery.change-quantity.js' &nbsp;&nbsp; &nbsp;]; &nbsp; &nbsp; public function createConfig(Form\Container\TabContainer $container) &nbsp; &nbsp; { &nbsp; &nbsp; }&nbsp;&nbsp; &nbsp; }
