Ad

Bootstrap Collapse And Modal Windows JS

Hello i got problem with my site with collapse items and modal windows.

As You Can see there are two domains and this two domains using the same files on web server. They differ in websites is that there are appending other languages depends of domain.

Maybe its matter Im using Cloudflare on two domains. I have purged cache and same result.

1.

  • There collapse is not working. https://tibiaservers.net/faq

  • But there is working perfectly. https://tibiaservers.pl/faq

2.

  • There modal window is not working when You click on Safer 10.90 MiniBothttps://tibiaservers.net/download

  • But there modal window is showing and working well when You click https://tibiaservers.pl/download

The same behavior - not working on domains:

https://germany.tibiaservers.net/download

https://sweden.tibiaservers.net/download

On localhost everything working well.

How its possible.

Ad

Answer

Cloudflare is messing with your jQuery.

If you check the console, you'll see the symbol $ is undefined, but jQuery is an object.

Since you're using the symbol $ in your code, you have javascript errors, example: $('#feat_name').html(pre_img);

Rocket Loader does have the potential to break some JavaScript and jQuery functions as a beta feature. If you're having issues with JavaScript or jQuery, please do the following:

  1. Turn off Rocket Loader in your Performance Settings. You can get to your Performance Settings by going to: settings->CloudFlare Settings->Performance Settings->Rocket Loader->Toggle Off.

You can alternatively get to your performance settings by replacing the domain in the following url:

`https://www.cloudflare.com/cloudflare-settings?z=YOURDOMAIN.COM#page=performance

Ad
source: stackoverflow.com
Ad