Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Bad access from Laravel project #114

Open
Nheo6 opened this issue Jun 29, 2017 · 3 comments
Open

Bad access from Laravel project #114

Nheo6 opened this issue Jun 29, 2017 · 3 comments

Comments

@Nheo6
Copy link

Nheo6 commented Jun 29, 2017

By using npm install on my laravel's project, i can't access clockpicker function. I had to check source code to understand that i must use "jqclockpicker()" instead of clockpicker()".

capture d ecran 2017-06-29 a 12 05 07

@PrzemekTkaczyk
Copy link

use $('id/class').clockpicker()

@Nheo6
Copy link
Author

Nheo6 commented Jul 5, 2017

"clockpicker is not a function" .. :(

@castillo-n
Copy link

Hi! As an advice, you should add not just the line of your call also the error -As I see that you just added the error line and not the code I will advice as if I was advising a noob...-
Did you got the add the style sheet tag and the js script tag to your page? (All my sites are on laravel and I havent found that error)
if you added clockpicker into the page, did you added jquery before the clockpicker js script tag?
this should be done like this

<script type="text/javascript" src="/bower_components/jquery/dist/jquery.min.js"></script>
            <script src="/bower_components/clockpicker/dist/jquery-clockpicker.js"></script>
and not like this: -as this for sure will give you an error-
            <script src="/bower_components/clockpicker/dist/jquery-clockpicker.js"></script> 
            <script type="text/javascript" src="/bower_components/jquery/dist/jquery.min.js"></script>

if you have done such thing, did you tried putting your js script into the $(function() {}) tags?? these is always recommended so the code is run after jquery is loaded.. and you should added like this on your page

        <script type="text/javascript">
            $(function() {
                $(".my_datepicker_input").datepicker(); //or whichever class or id you want
            });
        </script>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants