Javascript Conflicts

Home Forums Calendar Products Events Calendar PRO Javascript Conflicts

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #151834
    360zen
    Participant

    Hi,
    I’ve been having trouble getting the attention of the support team here and I’m up against a deadline now. I am getting Javascript errors in the console, which I’m fairly certain are because of an issue with how jQuery is being called or loaded by The Events Calendar. See http://pop.360zen.com/events to see my problem. The Events Calendar works fine, but any other jQuery-based plugin or script that I try to run breaks when on the same page as The Events Calendar. Right now, the slider at that top of the page should be showing jQuery transitions, but isn’t. I’ve posted over here, where the same problem is reported, and have found at least two other threads where people had the same issue. None of them have been resolved and I am about to have to start over with a new calendar plugin. Please help!

    #152100
    Barry
    Member

    Hi 360zen,

    Sorry you had difficulties attracting our attention – I do see you posted a few times at the tail end of this thread. We should have noticed that and apologies for not doing so. That said, it is usually best to create a fresh thread of your own as especially if a staff member marks a thread as having been effectively resolved they may not be aware of further updates by customers other than the original poster.

    On looking at your site I do see an error and it relates to this piece of JS which is printed inline rather than being loaded from a separate resource:

    <script>
        $(document).ready(function(){
        $(".scroll").click(function(event){
            //prevent the default action for the click event
            event.preventDefault();
    
            //get the full url - like mysitecom/index.htm#home
            var full_url = this.href;
    
            //split the url by # and get the anchor target name - home in mysitecom/index.htm#home
            var parts = full_url.split("#");
            var trgt = parts[1];
    
            //get the top offset of the target anchor
            var target_offset = $("#"+trgt).offset();
            var target_top = target_offset.top;
    
            //goto that anchor by setting the body scroll top to anchor top
            $('html, body').animate({scrollTop:target_top}, 1500, 'easeInSine');
        });
    });
    </script>

    This isn’t something our plugin is generating, but it is the source of at least one error. Resolving this is a good first step.

    I do see you noted having deactivated all other plugins and having also switched to a default, unmodified theme – can you confirm what errors you are seeing in the console at that point? I’m surprised you would still hit this under those conditions – but let me know and we can take things from there.

    Thanks!

    #152827
    360zen
    Participant

    Hi Barry,
    The script that you posted is just one of 4 or 5 different jQuery scripts/plugins that I have tried with this page. All have failed when placed on the same page as The Events Calendar. With a default theme and no other plugins, I get no errors… presumably because there is no other jQuery to conflict with. Are you suggesting that The Events Calendar was designed to only be run on a default theme with no other plugins?

    #154123
    Barry
    Member

    <p>Of course not – it should work with all well coded plugins and themes, though sometimes conflicts can and do happen.</p><p>On visiting your site today though it looks like transitions work and I’m not seeing any JS errors (other than some we can safely ignore).</p><p>Are you still finding there is a problem here/have you resolved the problem?</p>

    #701431
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Javascript Conflicts’ is closed to new replies.