Adam Taylor
Adam Taylor

Reputation: 7783

datePicker jquery plugin not properly load

I'm trying to use the following plugin for date picking:

http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/index.html

And I'm trying to use the code from the first demo but I get an error that jQuery is not defined (last line of the plugin, where the function is closed).

I haven't used jQuery before so I'm hoping this is a simple error.

I've tried to call it as follows:

<script type="text/javascript" charset="utf-8">
    $(function () {
        $('.date-pick').datePicker();
    }
</script>

^ Inside the head of the page. There is also another jQuery code in the head, could this be causing a problem?

The plugin and other required JS are all present.

Adam

Upvotes: 0

Views: 464

Answers (1)

mck89
mck89

Reputation: 19241

Try this:

<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
        $('.date-pick').datePicker();
})
</script>

Upvotes: 2

Related Questions