Loading...
JavaScript | ошибка с библиотекой
не пойму почем проблема библиотеки а так скрипт работает нормально, а в консоле выдает ошибки Uncaught ReferenceError: cookie is not defined at HTMLDocument.<anonymous> Uncaught ReferenceError: cookie is not defined at HTMLDocument.<anonymous> (index.php?5pT010IG:571:22) at o (jquery-1.7.2.min.js:2:14733) at Object.fireWith (jquery-1.7.2.min.js:2:15502) at Function.ready (jquery-1.7.2.min.js:2:9594) at HTMLDocument.B (jquery-1.7.2.min.js:2:14290)
javascript
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>   <script src="/ajax/scroll/jquery.mCustomScrollbar.concat.min.js"></script>   $(function(){ // вызывается во время onLoad         var scroll = cookie('scroll');         if (scroll) {             window.scrollTo(0, scroll);             cookie('scroll', 0); // удалить куку напрочъ.         }                  $('.content-wrapper, .post-container').click(function(){             cookie('scroll'              , (window.scrollY) ? window.scrollY                : document.documentElement.scrollTop ? document.documentElement.scrollTop                : document.body.scrollTop             , {                 expires: 10000 // через 10 секунд будет неактуально!               })         }) })   

________
посл. ред. 05.10.2023 в 18:44; всего 2 раз(а); by pyrokinesis
А где ты сделал cookie? Пишет что не определены cookie, что в вкладке приложение?
pyrokinesis (5 окт 2023, в 18:42)
не пойму почем проблема библиотеки а так скрипт работает нормально, а в консоле выдает ошибки Uncaught ReferenceError: cookie is not defined at HTMLDocument.<anonymous> Uncaught ReferenceError: cookie is not defined at HTMLDocument.<anonymous> (index.php?5pT010IG:571:22) at o (jquery-1.7.2.min.js:2:14733) at Object.fireWith (jquery-1.7.2.min.js:2:15502) at Function.ready (jquery-1.7.2.min.js:2:9594) at HTMLDocument.B (jquery-1.7.2.min.js:2:14290)
javascript
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>   <script src="/ajax/scroll/jquery.mCustomScrollbar.concat.min.js"></script>   $(function(){ // вызывается во время onLoad         var scroll = cookie('scroll');         if (scroll) {             window.scrollTo(0, scroll);             cookie('scroll', 0); // удалить куку напрочъ.         }                  $('.content-wrapper, .post-container').click(function(){             cookie('scroll'              , (window.scrollY) ? window.scrollY                : document.documentElement.scrollTop ? document.documentElement.scrollTop                : document.body.scrollTop             , {                 expires: 10000 // через 10 секунд будет неактуально!               })         }) })   
Причина в том что ты мат
а где у тебя определена функция cookie?
Библиотеку надо подключить
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js" integrity="sha512-3j3VU6WC5rPQB4Ld1jnLV7Kd5xr+cq9avvhwqzbH/taCRNURoeEpoPBK9pDyeukwSxwRPJ8fDgvYXd6SkaZ2TA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
nicefile (5 окт 2023, в 21:53)
а где у тебя определена функция cookie?
Она позволяет странице не скролится вверх после обновления брацзера
System , спасибо, попробую
jquery 1.11.1
Братан, как тебе там в 2007 году, норм? Привет из 2023 :-)
Something (6 окт 2023, в 7:49)
jquery 1.11.1
Братан, как тебе там в 2007 году, норм? Привет из 2023 :-)
Мне скрипт требовал такой версии )). Подскажешь последнюю ?
Онлайн: 1
Время:
Gen. 0.128
(c) Bym.Guru 2010-2026