New Landing How can we help? Themeforest Theme Support Dante "SWIFT is not defined" error after 2.82 -> 3.06 upgrade

Viewing 11 posts - 1 through 11 (of 11 total)
  • Posted in: Dante
  • #204324
    cormip
    Member
    Post count: 9

    The error occurs in functions.js line 2748:

    `SWIFT.parallax.parallaxVideoResize(parallaxAsset);

    I am seeing some erratic behavior now related to loading and resizing of videos…

    This error is reported by Chrome, Firefox and IE(11).

    #204328
    cormip
    Member
    Post count: 9

    Hmmm, also, smoothscroll links no longer work, throwing an error:

    Uncaught TypeError: Cannot read property ‘top’ of undefined

    functions.js line 151

    jQuery('html, body').stop().animate({
    	scrollTop: jQuery(linkHref).offset().top + spacerHeight - headerHeight - 10
    }, 1000, 'easeInOutExpo');
    #204331
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @cormip

    The first is fixed for the next update. For the second, check the element actually exists on the page?

    – Ed

    #204335
    cormip
    Member
    Post count: 9

    It scrolls to the correct section of the page, only it does not do it smoothly. I no longer see where I can add an optional class (smooth-scroll-link) to menu items like in this picture.

    What I see is attached below.

    Attachments:
    You must be logged in to view attached files.
    #204337
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Go to the Screen Options tab at the top of the menu admin page – make sure CSS Classes is checked.

    – Ed

    #204338
    cormip
    Member
    Post count: 9

    OK, sorry, didn’t even know that was an option. I’ve gone ahead and added the smooth-scroll-link custom class to the menu items, however it appears that it applies the class to the li container and not the anchor tag itself:

    <li class="menu-item-22 smooth-scroll-link menu-item menu-item-type-custom menu-item-object-custom">
       <a href="//stormwaternc.com#about">About<span class="nav-line"></span></a>
    </li>

    Looking at the code that triggers it in function.js, it appears that this class needs to be specifically applied to the anchor tag:

    // SMOOTH SCROLL LINKS
    jQuery('a.smooth-scroll-link').on('click', function(e) {

    Therefore, the smooth scroll still isn’t working…

    #204339
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Apologies – was confused about that. The menu links automatically with a # link, but can only do so with the # at the start.

    – Ed

    #204531
    Chris
    Member
    Post count: 16

    Have same issue with `SWIFT.parallax.parallaxVideoResize(parallaxAsset);.
    Using Safari.

    Reverted back to 2.8.2 for now.

    #204622
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Sending out update later on today.

    – Ed

    #204637
    cormip
    Member
    Post count: 9

    OK, I updated the menu links to start with a # and it fixed the smooth-scroll issues. However, using such links introduces a new problem for which I did find a work-around which I’ll document for other who might run into the problem:

    If the user clicks to view a team member page, that page does not contain the sections or anchors that the home page has. Therefore, if the menu link is simply “#contact”, this works on the home page to scroll to the contact form I placed at the bottom of the page. However, this menu now no longer works on the Team member pages, since that anchor doesn’t exist.

    The Solution

    Create 2 separate menus: one with just the anchors as links (e.g. #contact) and another with the full URL with anchor link (e.g. //mywebsite.com#contact). The second menu you set as the “default” for the site. The first you manually set for the given page using the Page Meta tab.

    This combo makes the smooth-scroll work on the home page, and the team, portfolio, etc theme sub-pages will also have a working menu that navigates back to the proper section of the Home Page.

    #204741
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Glad you sorted. Thanks for sharing your solution with others.
    -Rui

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register