-2

I´m using jQuery UI datePicker and jQuery UI toolTip and they work fine. Then I also want to use the tagsManager from Bootstrap, but when I include the "bootstrap-tagmanager.js" and the "bootstrap.min.js" I start getting "TypeError: e is null" messages and neither the datePicker or the toolTip works. (TypeError happens when click on the date-field for the datePicker).

Anyone has a work-around for this?

Asle G
  • 568
  • 7
  • 27

3 Answers3

2

Are you including the javascript files in this order?

  1. jquery.js
  2. bootstrap.min.js
  3. bootstrap-tagsmanager.js

look at: Does the ORDER of javascript files matter, when they are all combined into one file?

Community
  • 1
  • 1
S. A. Kıyak
  • 127
  • 5
0

if you have conflit between jQuery file, use $.noConflict(); before your $(document).ready();

Make sure that your lib call is good. Call first the jQuery and add bootstrap lib after.

Donovan Charpin
  • 3,567
  • 22
  • 30
  • Strangely enough the $.noConflict(); cause my program to fail with the error message (console): "TypeError: $ is not a function". It even happens without the bootstrap libs. I call "jquery.js", "jquery.min.js", "jquery-ui.min.js", then knockout.js before the bootstrap-libs – Asle G Sep 25 '13 at 11:55
  • 1
    jquery.js and jquery.min.js are the same files. Difference is just that .min.js is a js file minimized, so unreadable. Moreover, the size change. You can remove jquery.js. And try `jQuery.noConflict(); ` : http://api.jquery.com/jQuery.noConflict/ – Donovan Charpin Sep 25 '13 at 12:27
  • Ok, thanx. So I removed the query.js. and added the noConflict. Still the same error and nonworking date picker (unless I remove the bootstrap libs that is). – Asle G Sep 25 '13 at 13:49
  • I need the website to find the problem. I can't help you more without code :/. – Donovan Charpin Sep 25 '13 at 13:52
  • That´s a bi tricky as I´m developing on a local server... hmm. I can try to add an answer with what I´m trying to do... – Asle G Sep 25 '13 at 13:58
  • Sjekk this: http://jsfiddle.net/U82Bv/1/ Here are part of my code and what I am trying to do. The datepicker-calender does not show if I include the bootstrap libs, I can´t populate the input field with the date from the date picker. Also without bootstrap-libs I cannot get the tagsManager to work... – Asle G Sep 25 '13 at 14:18
0

Maybe, jQuery.noConflict() will help you. http://api.jquery.com/jQuery.noConflict/#jQuery-noConflict1

Andrey Ozornin
  • 1,129
  • 1
  • 9
  • 24