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?
Are you including the javascript files in this order?
jquery.js
bootstrap.min.js
bootstrap-tagsmanager.js
look at: Does the ORDER of javascript files matter, when they are all combined into one file?
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.
Maybe, jQuery.noConflict() will help you.
http://api.jquery.com/jQuery.noConflict/#jQuery-noConflict1
Related
I've posted here before but can't find my account so this is my new first post.
I'm attempting to use a js plugin called "blueberry slider" with a responsive js menu called "Menumaker" and something is conflicting, can't get the slider to show. I really don't know what I'm doing with JS yet, hoping someone can help. In Chrome, element inspection, it's saying "undefined is not a function". I haven't modified anything of the plugins.
I think your problem is probably that you're loading a version of jquery, adding a plugin to it, and then loading a new version of jquery and attempting to add a plugin to that, too. Pick a single version of jquery to include. You're including three:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
at the top,
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
just above your blueberry script, and
<script src="js/jquery-1.8.3.min.js"></script>
at the bottom just above your menumaker script.
The latest version of jQuery loads and overwrites your blueberry script's modified version of jQuery.
I suggest you just get rid of the last two and use the first version.
the function which you are calling and function present in your plugin library doesn't match , which is the reason it doesn't find any function named "undefined" in that library. Try checking the function name in it's documentation.
I am creating a plugin which uses the jQuery fullCalender.
The code appears to all be working fine however when the page fully loads and my shortcode populates its appropriate html and javascript I get the following error:
So from this I can gather that jQuery resolves ok - but somehow the calendar does not? Can somebody please help me! It may be because I am using OptimizePress which might be including its own copy of jQuery - and my plugin is also including a copy of jQuery and the calendar. But I dont know how to make sure i reference my own jQuery or make this work.
Thanks!
The answer was to use wp_register_script and wp_enqueue_script to add the script to my generated document
I used the Jquery 1.9.1 and used the code to fire when browser window will get closed as
My JSP will be ,
But this shows a red underline error like show in picture in eclipse.
I don't know why I am getting this error.Can any one help me to solve this.
Don't hesitate to ask any question.
Good answers are definitely appreciated.
Have you tried wrapping the code in doc ready handler:
$(function(){
//here unload and before unload
});
and you have to look that your jquery 1.9.1 is properly loading.
about error:
That is quite possible if you are using a CDN Hosted jQuery library. Try loading it locally and referencing it from there.
$ is an alias for jQuery. If $ is undefined it means the jQuery library has not been properly loaded. Be sure to include it in the page before attempting to use any jQuery methods.
I'm using Gantry template on Joomla! that has bootstrap integrated into it. I wanted to use the bootstrap javascript components, like lightbox, tabs. I added jQuery (no conflict) as mootools is already loaded, and then added the required code. But, it doesn't work as expected. I set up a test page at http://v2.marlownailandbeauty.co.uk/index.php?option=com_content&view=article&id=47&Itemid=127
Neither the tabs, nor the lightbox work (just below youtube vid). I can't see any JS errors, just wondering why it might not be working? Any bright ideas? :)
Looking at your code quickly, it seems to me that you load:
jQuery
JQuery no conflict
Mootools
Various other Mootools scrripts
To the best of my understanding, it's recommended to load jQuery (no conflict) after Mootools and all the other scripts have loaded: source http://docs.jquery.com/Using_jQuery_with_Other_Libraries
ie:
jQuery
Mootools
Various other Mootools scrripts
JQuery no conflict
A couple of ways to test this quickly. You could edit the template file directly and change the order, or use an extension like jQuery Easy to load the no conflict scripts.
Or a third option ... have you checked if you even need Mootools in your template? You could use an extension to disable mootools and see what happens. If you are lucky your template will still work well and your site will load faster. And it's easy enough to reverse if mootools is indeed needed.
Good luck!
How do you guys resolve conflicts between Jquery plugins. A conflict would be a situation where two or more Jquery plugins (such as a file upload plugin) work properly alone but result in errors or unintended behavior when you include a second plugin.
I have this problem right now and I am considering using an iframe to isolate sections of my page from everything else. But I want to avoid this if possible to work out these conflicts.
Auditing the plugin code is not feasible its mountains of code and there are short development times to consider.
I can't use jquery.noConflict because I would have to fire it and then replace the $ with Jquery in ever line of my code. Editing the plugins is not feasible. I thought jquery.noConflict didn't work for plugins? It only works for javascript/jquery libraries? I'm not reffering to libraries. Just plugins like sliders, galleries, fileuploaders etc etc.
I used:
(function($) {
jQuery.noConflict();
});
Already..
After some digging around on the web I found some resources
Jquery Plugin conflict
How do I solve this jQuery plugins conflict?
http://forum.jquery.com/topic/jquery-plugins-conflict
And the last one
http://www.jotform.com/help/130-Fixing-Jquery-Plugin-Conflicts-jCarousel
It seems that everyone suggest to use noconflict but except for the last one who said it worked - I don't see a reason it should work, since in documentations JQuery explains that it was meant for libraries that don't use JQuery but collide with it. ( see the 3rd resource I pasted here).
Anyway, it seems as if the best option is to dive into the code and modify it.
i had an issue with jquery conflict, but my case was i had also used prototype.js. i worked out a solution for that. here is a pointer checkout if it helps.
jquery conflict occurs when "$" is also used by some other plugins. hence we need to define jQuery.noConflict
so that all the methods are called using some other reference in this case 'jQuery'.
try include the scripts files on the page as follows.
include all the jQuery files (library and all plugins which are dependent on jquery).
fire jQuery.noConflict();
include all other libraries/ plugins.
wherever jquery methods are called use "jQuery" istead of "$"
hope this helps you out..