Rich-text Reply

TypeError $ on ist not a function

Mr-BS 06-22-16
Accepted Solution

TypeError $ on ist not a function

Hey,

I have some click and change events in my variation code and if I´m changing to an mobile device in the editor I received this alert:

Bildschirmfoto 2016-06-22 um 18.01.27.png

I include trimmed jQuery 1.11.3 and this version should have the on event.

Code looks like this:

$('body').on('change', 'input[type=radio][id=myid]',
    function(){
        do something
});

I don´t know why I get this alert.

Level 2

David_Orr 06-22-16
 

Re: TypeError $ on ist not a function

Hi,

Thank you for reaching out. You may be receiving this error because the visual editor is loading a page that does not have jQuery installed. This error only affects the editor and should not affect the experiment.

Can you try adding the following query parameter to the URL in the address bar: optimizely_disable_proxy=true

The reason for this is because the mobile view always loads a page via our proxy by default. This causes issues if a site is restricted to specific IPs or require a login/password.

David
Senior Technical Support Engineer
Optimizely