0

Tengo el siguiente error al tratar de usar el nicescroll en angular:

Uncaught TypeError: $(...).niceScroll is not a function at common-scripts.js:92 at common-scripts.js:157 (anonymous) @ common-scripts.js:92 (anonymous) @ common-scripts.js:157 core.js:3073 Angular is running in the development mode. Call enableProdMode() to enable the production mode. zone.js:192 Uncaught TypeError: $(...).dcAccordion is not a function at HTMLDocument. (common-scripts.js:3) at c (jquery.js:4) at Object.fireWith [as resolveWith] (jquery.js:4) at Function.ready (jquery.js:4) at HTMLDocument.q (jquery.js:4) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188) at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:496) at invokeTask (zone.js:1540) at HTMLDocument.globalZoneAwareCallback (zone.js:1566)

la linea de error es :

$("#sidebar").niceScroll({
    styler:"fb",
    cursorcolor:"#e8403f", 
    cursorwidth: '3', 
    cursorborderradius: '10px', 
    background: '#404040', 
    spacebarenabled:false, 
    cursorborder: '', 
    scrollspeed: 60
});

1 respuesta 1

0

intenta con este codigo

$("#sidebar").scroll(function(){
  $("#sidebar").getNiceScroll().resize();
});
1
  • deberías agregar una explicación del mismo para que tu respuesta mejore en calidad
    – user75901
    el 2 jul. 2018 a las 20:15

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.