Jquery Select2.js Does Not Work After Migration - javascript

I migrated my form from a file to another with different file location. I also have changed all reference paths on that new file. Unfortunately, the select2() function doesn't work anymore in
$("#field1, #field2, #field3").select2();
To make sure if the path is right, I have tried to put
alert('hello from select2.js');
And the alert function works when I open the form. And it makes me confused why the .select2() function does not work.
Did I miss something? Please help and thanks for advance.

Finally found it. After two days. I refered to jquery.js twice. And I don't know why, it really caused the error. After I dismiss one of them, my problem solved. Thanks for everyone who tried to help me :)

Related

Ajax Path not working, can't find the cause

I have a simple Ajax function that changes a div.
The following code works, but it loads the index.php in my div also, which I don't want.
xmlhttp.open("GET","index.php?p=productDesc&q="+currentID,true);
Although the above works I'm trying to take the productDesc.php only, and it does not work.
xmlhttp.open("GET","pages/productDesc&q="+currentID,true);
Any ideas what might be causing that?
I searched but according to what I found I don't have anything wrong.
Any help appreciated.

Magento homepage has conflict only on the index.php

We have made some changes on our homepage and it all went fine until we clicked to get to the homepage... Which is somehow different. Example: http://www.testsite.net <- this one is fine with the jQuery and Javascript together.
Example: http://www.testsite.net/index.php <- this one doesn't work with jQuery and Javascript together.
I have no idea why it doesn't work only on index.php...
My question is, why doesn't this work? Is there something special I need to know?
Do you have any suggestions? A workaround maybe?
I can post some code but it's kind of a pain to do that because it's quite alot.
If you want some code, please state what kind of code you need...
Any more information needed? Feel free to ask.
Thanks in advance!
You need to search in jquery and javascript code if you find your static url "http://www.testsite.net" then you need to make dynamic with location.hostname

Joomla Component generating JS Error - function not defined

so i have the issue, that i installed a gallery module/component in joomla ("
Unite Responsive Tile Gallery").
But this module didn't work. its keep getting me JS errors in my console that the function "rtg" is not defined.
(example: http://bonesetterband.de/gallerie.html )
i would ask the maintainer/writer of the component, but it seems that's just me with this problem and i didn't get any easy help, so i just thought about asking here ;-)
so may there are some JQuery conflicts? if i change back to prostar theme, everything works fine. but i didn't find any differences in the templates which are explain this issue.
anybody a good idea what to check or to try?
thanks in advance

Javascript failing to run

I am in the middle of development and everything related to javascript all of the sudden stopped working.
There are a couple ‘no method’ errors in the console, but I can’t seem to find the root of the problem.
My site: http://radiantchurch.info/wordpress/about/
Thanks for all your help!
You must place your javascript references in correct order:
jquery
jquery plugin
your js scripts
IT does look like fitvids is not a function or not found, can you comment it out and then check it.

Why might toggles not work?

This page has toggles, in the "Why We're So Good" section. They suddenly stopped working. I don't know what might of changed since then. This is how they'd work, normally.
Could someone please explain how the toggles work in general, and why they aren't working now?
(Also, is there any way to find out what JavaScript is changing the document?)
EDIT: prettyPhoto is an a completely unrelated script that does lightbox stuff
You are missing the http://wowballoons.com/wb/wp-content/themes/nevada/nevada/javascripts/jquery.prettyPhoto.js?ver=1.3 file in your application, that is why it is not working.
Please download the prettyPhoto script file and add it to your page.
You have a script error on the html page:
$("a[data-rel^='prettyPhoto']").prettyPhoto({
TypeError: $(...).prettyPhoto is not a function

Categories