Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • 7then8 Friend
    #911874

    Hi,
    I use Uber Corporate as onescroll-page with header style-8. The acm header style-8 navigation has a nice smooth scroll effect and targets the anchors perfectly.

    I use Hero style 1 for the first visible acm-module. The buttons target 2 anchors (similar to menu-items) . I was not able to implement the header-style-8 js to scroll "smooth" and to target the anchor correctly + calculate the header height.

    I am not familiar with js, so it would be very kind to get your help.
    I send the URL of the landingpage with the next post.

    Thanks Dan

    7then8 Friend
    #911878
    This reply has been marked as private.
    pavit Moderator
    #911880

    Hi there

    You can try in this way

    Edit your hero-style-1 php file here /templates/uber/acm/hero/tmpl/ and add at the end of file this script

    <script>
    (function ($) {
    $(document).ready(function() {
    $(‘a[href^="#"]’).click(function() {
    var target = $(this.hash);
    if (target.length == 0) target = $(‘a[name="’ + this.hash.substr(1) + ‘"]’);
    if (target.length == 0) target = $(‘html’);
    $(‘html, body’).animate({ scrollTop: target.offset().top }, 1200);
    return false;
    });
    });
    })(jQuery);
    </script>

    Make always a backup of your original file

    7then8 Friend
    #911890

    Hi Pavit, smooth scroll works (tried it local, so its not in the livesite yet).
    Now for the buttons the top offset of 80px is missing.
    And its not compatible with the other script I think; it scrolls down smooth but fast as before – and then it goes down the missing 80px with a very slow move.
    Thank you, Dan

    pavit Moderator
    #912191

    Hi there

    I’m sorry but if i cannot see it i don’t know what to say, i can confirm that i already used this script on a JA Acm Hero module and it worked fine .

    7then8 Friend
    #918795

    Hi pavit, the script you sent me applies an smooth scroll to every anchor, right? Maybe I was not clear: There is a sticky header. The 80px of the sticky header are not applied by scrolling from the buttons of hero-1 to the anchor. And it interferences with the js in header-8.

    What I need is to apply the same effect as header 8 uses to the two buttons of hero 1. Unfortunatly I am not programming js, so I dont know how to modify the script in header-8 to use it in hero-1.

    Maybe you can rethink this case without the js in the live site, which is used with adwords.

    Conclusion:

    1. Your script, applied to the buttons, make the scroll-down smooth, but does not target the right position (it does not recognize the sticky header)
    2. If your script is applied, the menu-items in Header scroll down smooth – as before to the right target (anchor + header) but start then after a stop to scroll back very slow to a position anchor without header. Sorry for my English 😉 Dan

    This is the code in header-8, I want it to use in hero-1 applied to the buttons:

    
    <?php if($enableSticky): ?>
    &lt;script&gt;
    (function ($) {
        $(document).ready(function(){
            $('#uber-header-<?php echo ($module->id) ?>').affix({
            offset: {
                  top: $('#uber-header-<?php echo ($module->id) ?>').offset().top
                }
        });
        });
    })(jQuery);
    &lt;/script&gt;
    <?php endif; ?>
    
    <?php $doc->addScript (T3_TEMPLATE_URL.'/acm/header/js/jquery.smooth-scroll.min.js'); ?>
    &lt;script&gt;
    (function ($) {
        $(document).ready(function(){ 
            $('body').scrollspy({ target: '.uber-header .t3-navbar', offset: $('.uber-header').outerHeight() })
    
            $('.uber-header .t3-navbar a').smoothScroll({
                offset: -$('.uber-header').outerHeight() + 1,
                easing: 'swing',
                speed: 800,
                autoCoefficient: 2,
                preventDefault: true
            });
    
        });
    })(jQuery);
    &lt;/script&gt;
    pavit Moderator
    #918835

    Hi

    I’m sorry but what you are asking require a dedicated custom work to apply to php files too , i can suggest to hire a developer for this if you are not able to manage yourself.

    You can try to ask for a quote on custom work page HERE

    Best regards

    7then8 Friend
    #918902

    Hi Pavit, I understand.
    I am very dissapointed, whatever I want – starting with an easy update through the autoupdater, seems to go behind a mysterious paywall.
    But that is not my problem. I am willing to pay. Why do you make ist so extremly hard, to get service?

    Should I take the developer membership, that you can help me in any case till it works?
    Is it really that big thing for you to add the header height to the script you sent me?

    I asked for a quote at the custom work, I am fine to pay for that.

    Is it useless to post in this forum? At the beginning I have a few questions, then I am a happy customer for years. So I am sorry, that you think its not worth to give support.

    pavit Moderator
    #918903

    starting with an easy update through the autoupdater, seems to go behind a mysterious paywall.

    I don’t think this is true, you can look at all my posts and also other moderators posts to see that IF WE CAN we help users for any type of question, also when question is outside this forum scope HERE a recent example.

    I helped you for what was possible for me to help in my answer above with the code i posted, i’m not a js coder but i used it taking code from other templates and adapted for Uber, but what you are asking as i said above is outside my skill, and it requires a JS coder to adapt it to your template, i only posted link to Joomlart custom service page because i thought it would be more fast and cheap for you , but i have not requested you to update your membership or forced your choices in any way.

    You can also look for an external developer at this url http://www.joomlancers.com

    Best regards

    7then8 Friend
    #922528

    Hi Pavit,
    that you force payment is not a problem, it is professional. The mysterious about the JAT paywalls is, that you cannot get lets say a clean update scenario, a clear module changelog for payment …
    The best stuff at JAT is the free stuff.
    So I was not surprised, that JAT did not answer my question for a quote. As its real a small thing for someone who knows js they do not even think to answer.
    Best regards

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

This topic contains 9 replies, has 2 voices, and was last updated by  7then8 8 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum