Jquery plugin qTip - scrollLeft is not a function - javascript

I am trying to make use of qTip JQuery plugin.
I have tried to implement it but I get an error reported by firebug.
f(window).scrollLeft is not a function
[Break on this error] (function(f){f.fn.qtip=function(B,u){var...asses:{tooltip:"qtip-blue"}}}})(jQuery);
Please have a look at my setup.
What am i doing wrong?

I viewed source on your page and it looks like the jQuery version your using is older than what qTip requires.
http://craigsworks.com/projects/qtip/docs/#requirements
jQuery version 1.2.6 and above
http://174.132.101.73/~dandy/tester/jquery.js
jQuery 1.2.3
update and you should be good.

You should wait until the DOM is loaded before trying to attach qtip to it, so wrap your code in:
$(function() {
// your code here
});
Also check the version requirements as Samuel points out.

Related

jQuery addClass is not working now

So I'm trying to add a class with jquery.
Here is the code:
jQuery(document).ready(function($) {
$('body').addClass('scrollbar-dynamic');
});
I can confirm the script is loaded on frontend as it appears in source code.
Plus all other javascript "1400 lines" works fine.
The addClass jquery method is also used about 30 more times throughout the script.
I'm also using the latest version of wordpress
It's just this time it's not working.
Here is a working js fiddle
Stuff like this just drives me crazy.
Cheers for the help
Ok - since console.log(jQuery) is returning what we'd expect, I think the issue is with how the library is being referenced. Here's your code:
jQuery(document).ready(function($) {
$('body').addClass('scrollbar-dynamic');
});
The script knows what jQuery is...but it doesn't seem to know what $ is, and it's not being bound to anything when it's called.
Try this - if it works, it's a binding issue.
jQuery(document).ready(function($) {
jQuery('body').addClass('scrollbar-dynamic');
});

How to make a jquery script compatible with jquery 2.x.x

I'd like to use this multi-level push menu in my webapplication. But the problem with this plugin is that it needs an older version of jQuery. It will crash in combination with v2.x.x of jQuery.
The owner has done this on purpose, so that older browser versions are covered with the plugin as well.
So I'd like to convert/migrate this script to make it compatible with the latest version of jQuery, the only problem is, is that jQuery isn't my 'thing' (yet). I'm not sure where to start, what to remove of what to add in the script.
My question basically is, can someone point me into the right direction to get this script working with the latest version of jQuery?
I'd really really appreciate any help!
EDIT:
UPDATED ANSWER:
Use Version2 from the Multilevel Push Menu download page! ::link:: ...
I downloaded that version, and changed from jquery-1.10.2 to jquery-2.0.3 ... and it's working perfectly! Here's a jsfiddle: jsfiddle.net/vLrp51g3
PREVIOUSLY ANSWERED
As suggested by A. Wolf, you can use migrate jquery js file to handle the older jquery version. Since the remaining plugins/scripts of your webpage might require latest jquery, you could use the getScript() function to load the migrate jquery for only the pushmenu plugin! Therefore, you should probably use the code provided below for your requirement...
$(document).ready(function(){
$.getScript( "http://code.jquery.com/jquery-migrate-1.2.1.min.js", function() {
$.getScript('js/jquery.multilevelpushmenu.min.js', function() {
$('#menu').multilevelpushmenu();
});
});
});

`The function $(Window) is undefined` err in jquery

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.

Nivo Slider have javascript error

I'm building a website which use Nivo Slider. At first, it worked nicely. But yesterday, when I tried again, it's suddenly stop moving. I haven't changed anything yet before I discovered this issue. I looked into the console and there is a javascript error which says:
Uncaught TypeError: Object [object Object] has no method 'live'
When I tried to look into jquery.nivo.slider.js, the error is on $('a.nivo-prevNav', slider) like below:
$('a.nivo-prevNav', slider).live('click', function(){
// function's content
});
Using google's inspect element feature, I search into the page and found there.
What is wrong with that? why it is suddenly stop moving? Any help would be appreciated.
The Nivo Slider needs jQuery to work. On your website you refer to jQuery like this
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
This is pretty dangerous, as the latest version constantly changes. As can be seen from the jQuery documentation at
http://api.jquery.com/live/
the live function is deprecated since jQuery 1.7. Looking at the unminified jQuery source at
http://code.jquery.com/jquery-latest.js
it seems like the function is not there anymore, which is why you get the error.
Solution: bind jQuery with a specific version - probably you can find out which version you need from Nivo Slider documentation. Some of the older versions of jQuery can be found here: http://jquery.com/download/
In jQuery version 1.9, which it looks like you're using, the live() function is actually deprecated: http://api.jquery.com/live/
I guess you may have to wait for Nivo to update their source to support the latest jQuery, you can go down to jQuery 1.7, or modify the Nivo source yourself.
There is now a new version of Nivo Slider (3.2) that uses .on instead of .live.
Or use an older version of jQuery (1.7.1 is working for us)
Replacing all the .live() with .on() in the nivo slider's js file worked for me. My jquery was version 1.9.1 .

Jquery "Delay is Not A Function" with Jquery 1.6.4

I looked at some of the other questions on here pertaining to this problem but they were all using an older version of Jquery. I am having a problem with the latest version of jquery which I am grabbing from the goolge link:
http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
When I execute this code it is giving the error "delay is not a function". It didn't use to do this and I can't figure out why it might be doing it now.
$('.news_title_main').children('ul').delay(1500).slideUp(1000).queue(function(next) {
removeLast();
});
Check the <head></head> of your html page because that is where you usually put scripts such as javascript scripts.
Cheers!

Categories