Open sknoops opened 3 years ago
Comenta el codigo del archivo paper-dashboard.js
// (function() {
// isWindows = navigator.platform.indexOf('Win') > -1 ? true : false;
// if (isWindows) {
// // if we are on windows OS we activate the perfectScrollbar function
// var ps = new PerfectScrollbar('.sidebar');
// var ps1 = new PerfectScrollbar('.sidebar-wrapper');
// var ps2 = new PerfectScrollbar('.main-panel');
// $('html').addClass('perfect-scrollbar-on');
// } else {
// $('html').addClass('perfect-scrollbar-off');
// }
// })();
y agrega esto luego del $(document).ready
isWindows = navigator.platform.indexOf('Win') > -1 ? true : false;
if (isWindows) {
// if we are on windows OS we activate the perfectScrollbar function
$('.sidebar').perfectScrollbar();
$('.sidebar-wrapper').perfectScrollbar();
$('.main-panel').perfectScrollbar();
$('html').addClass('perfect-scrollbar-on');
} else {
$('html').addClass('perfect-scrollbar-off');
}
Hmmmm, does not seem to help @facundoruiz ... still same error.
Hola, si tienes razón, mi culpa. yo estoy usando paper-dashboard-2 versión free https://www.creative-tim.com/product/paper-dashboard-2 y ahí se usa el plugin perfect-scrollbar v0.6.13 y la versión paper-dashboard-2-Pro plugin perfect-scrollbar v1.4.0 quizás cambiando de versión el plugin tu proyecto funcione!
PD: Fui a leer el https://demos.creative-tim.com/paper-dashboard-pro/assets/js/paper-dashboard.js busca la linea 123
if (isWindows) {
$('.bootstrap-select .dropdown-menu .inner').perfectScrollbar();
}
comenta o borrar esa esa linea Ahi creo que esta el problema en la version PRO.
Muchas gracias @facundoruiz ! This is working. :-) So the creator of the dashboard should also use the old version, or they should make their javascript compatible with the v1.4.0. Best regards, Steffen
And indeed, if I comment out the line you mentioned, but I found it on line 95, I can run the script with v1.4.0.
Version
Paper Dashboard PRO - V1.3.1
Reproduction link
https://demos.creative-tim.com/paper-dashboard-pro/examples/forms/extended.html
Operating System
Windows 10
Device
PC
Browser & Version
Chrome, latest
Steps to reproduce
Open the 'extended.html' page in the examples of paper-dashboard-pro-v1.3.1 Watch the console in Chrome See error mentioned in title
What is expected?
No error should be exptected in the console when opening this example
What is actually happening?
Error is produced, saying perfectScrollbar is not a function
Solution
Did not find any solution yet, please help me find one.
Additional comments
Thanks for the nice work you did, I really like the template. But I need to get it to work without errors, so thank you in advance for your swift response and help with this. Best regards, Steffen