I'm using Joomla! 2.5.8 and Virtuemart 2.0.18a and on Add to Cart I got "Typeerror $.facebox is undefined in vmprices.js (line 67)". When I changed my Joomla! Template to default I lost this error. Many researches gives that jQuery loads any time, but when I disabled VirtueMart jQuery, I've got an error that "jQuery is undefined".
My site is http://bestgifts.am
The reason is , you have multiple jquery includes by plugin or templates..
The quickest fix for facebox undefined error is include this code just before closing the body tag inside your template..
< script type="text/javascript" src="your_site_url/components/com_virtuemart/assets/js/facebox.js">
It works for me..
Dont forget to remove spaces from script tags..
It is work and for J1.5 + V2.0
Related
I found that solution, to expand all accordion sections:
http://www.bootply.com/peFUdnwOpZ
I copied the code in Joomla.
Via Gantry I loaded Javascript file. I tried even, to load the javascript within the article.
But It is not working. Can Anybody help?
Background information:
I had to add bootstrap min.js, otherwise, the function "accordion" was not working properly. Template is working with Bootstrap 3.3.6.
I tried even to add the exact same files, loaded in http://www.bootply.com/peFUdnwOpZ.
//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js
//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css
Next Try. I loaded script via Joomla plugin. I loaded the script in header and body, before and after head/body tag.
Nothing worked.
I traced it down: On another template, I worked with, I figured out, that the order of loading the 3 javascripts is very important. So, loading manually before end of header is much important! first jquery.min.js than bootstrap.min.js and than custom javascript (see in the example link) worked. But on my own site, it seems, there are some errors in loading jquery and bootstrap javascript properly. Because console says:
null is not an object (evaluating '$('.closeall').click')
So, it misses the link to the other javascript files. Maybe some can help?
I believe you may have forgot to add the following piece of code in your custom js file -
$('.closeall').click(function(){
$('.panel-collapse.in')
.collapse('hide');
});
$('.openall').click(function(){
$('.panel-collapse:not(".in")')
.collapse('show');
});
Hope this may work for you :-)
I am trying to put some dropdown buttons on my site (doc : http://foundation.zurb.com/sites/docs/dropdown.html). I got it to work by just putting foundation.min.js on my page but that includes all of the plugins and is pretty large. I am trying to set it up by loading individual plugins according to the documentation : http://foundation.zurb.com/sites/docs/javascript.html.
I am loading foundation.core.js and after that I'm also loading the keyboard util, box util, and dropdown plugin.
This is the error that I get..
Uncaught TypeError: Cannot read property '_init' of undefined
This error is occuring on line 245 of foundation.core.js. It happens even when I just load jQuery and foundation.core.js with no other Foundation files.
Anyone have any ideas as to what is causing this and how to fix it?
Try inserting foundation.util.mediaQuery after foundation.core. The two scripts have a co-dependency.
I got this error because VS can't find the jquery file. I have added it in solution explorer and added the source in my master page's head but VS can't find it for some unknown reason. I tried json2 and it doesn't work either. Finally I tried to use the directlink to jquery downloadpage and it worked and the problem was solved.
But, this isn't a clean fix since it will not work if the jquerysite stops working so I want a better fix do this problem. Do you have any tips?
This is the easy fix:
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
I think this is a jquery conflict error , please put this "jquery-1.9.1.min.js" file top of the all jquery files.
check your scripts folder
if you are using the same version of jquery as i am, you can add this line to your layout, if your page is indeed using a layout
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
I'm using wordpress and trying to include various JavaScript files in my theme's templates. The file which causes the error is the very last js file which is included but I still get this error. Could I get some help?
$(document).ready(function() {
$("#image-cycle").cycle();
});
the error is thrown at the very first line - but the script is loaded well after jQuery.
Wordpress uses jQuery's noconflict mode by default. This means you always have to wrap your code in a DOM ready handler that will map jQuery to the dollarsign, otherwise the dollarsign will be undefined, like this :
jQuery(document).ready(function($) {
$("#image-cycle").cycle();
});
The codex
You probably forgot to include Jquery.
Check if u have put put the script tags properly and closed them.
You might have put the src of jquery but the tags might be wrong.
I have really strange problem with fancybox(2.x). I was using this script for ages but i hadn't experienced such problem before.
So, i have website: http://tinyurl.com/6mx7an8 and i've included every jquery/fancybox files as manual says but the JS console gives me the error
Uncaught TypeError: Object [object Object] has no method 'fancybox'
Have you any idea what am i doing wrong?
Any help would be appreciated :)
There are couple of issues in your website.
You are including jQuery library 2 times one before and after including fancybox plugin js because of which the plugin which is added is cleared by second jQuery library inclusion.
There is some other library which is overridding $, so your code is not working because $ is not an alias for jQuery anymore. You can use jQuery.noConflict() to avoid conflicts with other libraries on the page which use the same variable $.
Looks like jQuery is included twice, once near the top of the head and once near the bottom.
I had a similar problem. Somehow, jQuery was being loaded twice. Turns out while testing something, I added a drupal_add_js line to load jquery in a block, which was disabled, but Drupal still evaluated the PHP in the disabled block.
When I removed the drupal_add_js line from the block, jQuery loaded fine, once per page.
I have a css unify php script on my website that added both jquery and jquery postmessage plugin into the same javascript file.
So it was giving me the error above.
I have loaded the jquery postmessage separately without unifying it and it stopped giving me the error.
I got it working with this code
<script type="text/javascript">
(function( $ ) {
$(document).ready( function( ) {
$("a#fancyBoxLink").fancybox({
'href' : '#popupvid',
'titleShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic'
});
});
})(jQuery);
</script>
Jquery sub library may included in main library ,For example jquery.ui.sortable.js i have included in jquery-ui.js while downloading and i added again it was giving a error for me.
script type="text/javascript" src="vendor/js/jquery-ui.js">
script type="text/javascript" src="vendor/js/jquery.ui.sortable.js">
so verify sub library included or not