Object [object Object] has no method - jQuery error - javascript

I am trying to get flexslider up and running but I am getting the following error.
Uncaught TypeError: Object [object Object] has no method 'flexslider' maximizesocialmedia.wordpresslochness.com/:234
It looks like the most common problem with that error is jQuery is loaded twice. I have been looking and can't find where it would be loaded twice on my site. When I view the source I can't find it loaded twice and I am not seeing anything in the chrome web inspector. Could there be a different reason as to why it's not working? Here is the site
If I need to update this post with any code please let me know.

You're not loading the flexslider plugin in your page, try adding it in a script tag, after jQuery.
It's probably named jquery.flexslider.min.js.

that console error could mean that the jquery/js for the flexslider haven't loaded so the flexslider give an error that the flexslider object for the settings is not defined as an object
i guess...

Seems like the jQuery flexslider is not loaded. I just looked at your site and I couldn't find the javascript file related to flexslider.
Include the flexslider javascript in you page and it should work.
I also noticed that the site used slidesjs

Related

jQuery UI tabs doesn´t work

on the page: http://www.turtle-esport.de is the jQuery UI feature "tabs". I use it to switch between 2 "twitch stream channels". I moved that page to another Webspace but now i get this error message in the console:
Uncaught TypeError: $(...).tabs is not a function
The console show me that jQuery is loaded. Can anyone help me?
Mistakes
Your jQuery file is included after the function call.
Could not find jQuery UI included in the page.
So move the code block after the jQuery file. Then download and use the jQuery UI Plugin.

Trouble implementing jQuery slider

I am having trouble implementing a jquery slider (flexslider)
I feel like I am missing something very basic, but for some reason I just cannot put my finger on it. Any help would be amazing. The link to the test site is below.
I am trying to get the slider to appear in the empty green area.
I am also working in Gumby responsive framework
http://4grain.bmdigitalgroup.com/
This is your issue:
Uncaught TypeError: Object [object Object] has no method 'flexslider'
...also looks like your loading your jquery file after the flexslider file. try keeping all your .js files in one place, with your jquery file on top of all of them.
You have 2 jquery files loaded on the same page. you should only need one, unless you are intentiontally trying to load 2 of them..
try placing your script...
$(window).load(function() {
$('.flexslider').flexslider();
});
at the bottom of the page, wrapped in a script tag, before the body ends, instead of inside the head of the page. the script is waiting until the page is loaded anyway.
UPDATE!
Hey good job so far! i'm seeing what you have done on your page via the web console.
And if you want to get rid of that...
Uncaught TypeError: Object [object Object] has no method 'on'
...then remove the jquery 1.6.2 file from the top of your page, and place the fexslider.js file at the bottom of your page.
As noted, you are having a double reference to the jquery library. Try doing this which will stop the dual references:
<script type="text/javascript" charset="utf-8">
$.noConflict();
$(window).load(function() {
$('.flexslider').flexslider();
});
</script>
Give #maincontentbody a height, perhaps 75px, then all of the children need to have a defined height and width, even id it's width:100%. min-height is not an appropriate value in this case
Your images appear to be much larger than the green bar area, do you think it will animate as well?

unable to get .datepicker() function to initiate on dynamically loaded page

I'm still quite new to JS and am having some issues with getting JS to run on a dynamically loaded page.
After loading the "Apply Online" page dynamically through the .load method I am unable to then get a jquery date picker to attach to the "appDataOfBirth" input field. After reading through a couple similar posts I've tried things such as .live however even though this works for say an alert, it won't initialize the date picker.
I've been playing around with something link below, where "applyOnlineBtn" is the carasel link to open up the application section displaying the form - however this does not seem to work.
$('#applyOnlineBtn').live("click", function(){
alert('test message');
$("#appDateOfBirth").datepicker();
});
If any one could help me to get this working it would be greatly appreciated.
Resources:
Website URL: http://www.kingsroad.net.au/qutproject/index.php
the JS that loads the content into the mid div is located at kingsroad.net.au/qutproject/js/general.js (this is where I've attempted to use my code to activate the date picker).
the online application content is located at kingsroad.net.au/qutproject/content/applyOnline.php
You May use
$('your_element').load(URL_TO_LOAD,function(){
$("#appDateOfBirth").datepicker();
});
this will apply datepicker to the new loaded content.
Did you check javascript error console?:
Uncaught TypeError: Object [object Object] has no method 'datepicker
So, check your datepicker library, maybe you've not include datepicker library in your page.

jQuery UI has no method 'sortable'

My playlist plug-in with jQuery UI works fine alone, but when I include it on the index page, it gives me this error:
Uncaught TypeError: Object [object Object] has no method 'sortable' /868
Here is my index page at Pastebin
My page's link
Your problem is likely this:
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
That's a relative path, so while js/jquery-ui.min.js might point to the right place in the first location, if there isn't a similar file there in the second location you're going to get the problem you see (ie. no jQuery UI).
I rearranged all my js includes and put them to the top of the index.php. Now it's working...

jQuery tabs is loaded but not working in WordPress

I am trying to work with jQuery UI tabs in WordPress but I keep getting the "jQuery("#").tabs is not a function" error.
I thought the tabs file might not be loading but looking in firebug it shows it is loading. I am also using modernizr so I thought there might be a conflict with that but using jQuery.noConflict(); did not solve the problem either. At first I used to load jQuery but for some reason it wouldn't work. Now I just linking directly to the files and they are loading.
If it helps, I am trying to get tabs working for this tutorial. The website I working on is lbk.newcoastmedia.com/wordpress
Thanks for any help!
I see the following scripts being loaded on your page:
modernizr-1.6.min.js
l10n.js
jquery.js
galleria.js
and
<script type="text/javascript">
jQuery(document).ready(function($){
$("#photo-rotator").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 4000);
});
</script>
$.tabs is an extension of jQuery UI, and I don't see jQuery UI or the tabs extension loaded on your page. Look at the very bottom of the source at your link and you'll see the following two scripts, which I believe are what you're missing.
ui.core.js
ui.tabs.js
Your debugger is alerting you that $.tabs is not a method because it really hasn't been defined yet.
Just had this problem on Drupal and resolved it by downloading a custom build of the jQuery UI library WITH Tabs selected. Apparently the default jQuery UI library that shipped with Drupal didn't have this module, so perhaps this is also the case with WP.

Categories

Resources