2

I was creating the datepicker in angularjs, So I inclued following js files.
1. <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>

2.<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>

3.<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.js"></script>

When I include jquery before jquery-ui, every thing working correctly, please see demo Datepicker is working

But when I include jquery-ui after then datepicker is not working, please explain this behaviour. Demo when datepicker is not working Demo : datepicker is not working

4
  • 1
    if you see in browser console in sample with datepicker is not working you can see error jquery-ui.min.js:5 Uncaught ReferenceError: jQuery is not defined Commented Aug 20, 2015 at 12:29
  • @Grundy thank for reply, But I am still getting error, please see updated questionthe sequence of including jquery Commented Aug 20, 2015 at 12:46
  • if you get error - just provide it Commented Aug 20, 2015 at 12:51
  • @Grundy sorry, I just mistake, element: datepicker instead of element.datepicker, thanks Commented Aug 20, 2015 at 13:03

1 Answer 1

4

Short answer: Yes.

All the dependent libraries should be loaded first. As jquery-ui depends on jquery, it should be loaded before jquery-ui.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.