yiister / yii2-gentelella

Free admin template for backend
MIT License
275 stars 113 forks source link

Jquery Error progressbar is not a function #15

Closed nitinpund closed 7 years ago

nitinpund commented 7 years ago

when I use bootstrap progressbar in my view page , console log displays the error as

custom.js:138 Uncaught TypeError: $(...).progressbar is not a function @ line 138 in custom.js

and

Uncaught TypeError: $(...).smartresize is not a function @ line 83 in custom js

in custom.js following block of code causes error

// Progressbar
if ($(".progress .progress-bar")[0]) {
    $('.progress .progress-bar').progressbar();
}
// /Progressbar
fps01 commented 7 years ago

@nitinpund Thanks for issue! I'll fix it.

Jhonatan1993 commented 6 years ago

como lo arreglastes tenco el mismo error ?

tifDev commented 6 years ago

@Jhonatan1993 es porque la orden de los scripts en el html no está correcta. Ejemplo:

    <!-- jQuery -->
    <script src="../vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="../vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="../vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="../vendors/nprogress/nprogress.js"></script>

    <!-- bootstrap-progressbar -->
    <script src="../vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>

    <!-- Custom Theme Scripts -->
    <script src="../build/js/custom.min.js"></script>

En esa orden se me desapareció el error.