html - Scrollbar plugin works in jsfiddle but malfunctions within actual application -


i implementing comment box , using perfect-scrollbar plugin in order implement scrolling functionality. whenever load page, built using angular have dummy comment text populates inside of comment box. within same controller set $timeout of 500 ms , call function initializes comment box's scrollbar. scrolling functionality works, not properly. scrollbar not visible , comment box scrolls twice height of content such reach end of comments , there blank space still available scroll.

i tried recreate problem within jsfiddle works flawlessly. here fiddle. here head portion of app

    <head>                <script src="scripts/angular.min.js" type="application/javascript"></script>                <link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.perfect-scrollbar/0.6.3/css/perfect-scrollbar.min.css" type="text/css"></link>               <script type="application/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.perfect-scrollbar/0.6.3/js/min/perfect-scrollbar.min.js"> </script>               <link href="appdetails.css" type="text/css" rel="stylesheet"></link>               <script src="appdetails.js" type="application/javascript" ></script>            </head> 

my javascript file perform calls initialize scrollbar looks same fiddle.

if run test in browser or examine exact code being run here html file link copy on google drive.

the perfect-scrollbar css not getting included file, y scrollbar stuck @ bottom of content instead of being position: absolute supposed to. works in fiddle because css has been explicitly added external resource.

you need add rel="stylesheet" <link> tag browser interpret styling.

<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.perfect-scrollbar/0.6.3/css/perfect-scrollbar.min.css"> 

Comments