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
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 using jQuery and Dojo widget on same JSP page but getting this issue,
Dojo part is working fine until I click on jquery based dropdown, as soon as I click jQuery-Dropdown, dojo based dropdown stops working.
I have searched a lot and tried following to resolve this issue but no use
Has anybody used Dojo and JQuery in the same project?
If I use
$.noConflict(true);
jquery dropdown stops working after one click, which means on first click it opens but then is not closed and not do anything else.
all the help would highly be appreciated.
Note: This is the very first time I am using Dojo and jquery.
EDIT: I used closure as well something like
(function($) {
var jQuery = $.noconflict(true);
var $ = jQuery;
})(jQuery);
but it also didnt help.
Please tell me how to make Dojo dropdown keep working even after Jquery-dropdown clicked.
If it helps there is another question regarding how to use jquery with dojo in the same project, it gives an example of the dojoConfig and talks about how to import jquery using AMD.
jQuery / Dojo - How do I use jQuery with Dojo toolkit
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 trying (and for the most part succeeding) to use the tipsy jQuery plugin in my greasemonkey script. I am using the #require meta tag to import the jquery and tipsy js, and it works, but with a couple caveats which I'm trying to overcome.
Accessing elements as a pure jQuery object fails, so I'm relegated to using DOM functions to get my elements:
//this fails
$('#login').find('a:first').tipsy();
//while this succeeds
$(document.getElementById('login').getElementsByTagName('a')[0]).tipsy();
Anyone know why? Need more info? TIA!
I think it's because inside Greasemonkey, jQuery has a different default context than the document. Try this:
$("#login", document).find('a:first').tipsy();
I am trying to use FormCheck for MooTools to validate a basic contact form I am planning to build. The problem is I can't seem to set up the script to work at all =(
If anyone knows about FormCheck or MooTools and can add any pointers they would all be greatly recieved.
My website is here: http://ryanis.me/
You are using jquery AND mootools on the same page? Why would you do that, it's a bad practice and bad form to stuff your users for two frameworks for what is a small page without anything complex. that aside, are you using the noconflict mode in either framework (note that this is only available since mootools 1.2.3 and requires some changes in the source code of the plugins, probably better off namespacing jquery)
first of all, you have a mootools domready function then you do inline js on the body tag onLoad...
then at the bottom of the source, you try the mootools domready again...
then you embed an accordion script (something that mootools can have built in as part of mootools-more). not sure what you use jquery for but you really need to structure your page better and pick a single framework.
the error you are getting in the formcheck js implies that either this.form is undefined (at time of evaluation $("contactform") was not available or that this.form.getElements() is not a valid method, which would imply that the mootools element prototype is not working. once again, are you using the noconflict mode?
it really needs refactoring and rethinking...
If you are using jQuery you may want to check out various jQuery plugins that will do form validation for you. The validation plugin works pretty well. If you want to use jQuery and MooTools together, you probably need to make sure that you are using jQuery in noConflict mode.