开发者

JS, jQuery Conflict.. help?

开发者 https://www.devze.com 2023-03-24 01:34 出处:网络
I am facing issue with a website which is currently on a test location. The problem is that the site loads incomplete for the first time on any browser and on 2nd time refreshing browser loads it co

I am facing issue with a website which is currently on a test location.

The problem is that the site loads incomplete for the first time on any browser and on 2nd time refreshing browser loads it complete.

http://test.whyislam.org

So far i believe its a Jquery conflict issue, any help would be hi开发者_Python百科ghly appreciated?


You are loading multiple copies of the library: I counted at least 4 different versions of jQuery. Pick one and remove the rest.

Another possible issue is that scripts aren't set to run on page load. Right at the end:

jQuery( '#SlideDeck_877_4' ).slidedeck( ... );

You can't be sure that the element has been rendered yet. Change it (and similar code) to:

$( document ).load( function() {
    jQuery( '#SlideDeck_877_4' ).slidedeck( ... );
} );


You can use a jquery noconflict like this jQuery.noConflict();

0

精彩评论

暂无评论...
验证码 换一张
取 消