Tagged: x
-
AuthorPosts
-
September 23, 2016 at 5:56 am #1187774
sirnarcisParticipantHello,
I have added an arrow navigation in the slider banner:
The arrow doesn’t work. And also smooth scroll doesn’t work.
I have added the JS script:
jQuery(function($){
$(‘.smooth-scroll’).click(function(e){
e.preventDefault();$(‘html,body’).animate({
scrollTop: $(‘#’ + $(this).attr(‘href’).split(“#”).slice(-1)[0] ).offset().top – $(‘.x-navbar’).height()
},700 ,’swing’);
});
});I have changed # with the same name I added where I want to scroll to
September 23, 2016 at 8:12 am #1187878
Paul RModeratorHi,
You can try this code instead
jQuery(function($) { // // Slider below. // $('.home .x-slider-scroll-bottom').on('touchstart click', function(e) { e.preventDefault(); var mastheadHeight = $('.masthead').outerHeight(); var navbarFixedTopHeight = $('.x-navbar-fixed-top-active .x-navbar').outerHeight(); var sliderAboveHeight = $('.x-slider-container.above').outerHeight(); var sliderBelowHeight = $('.x-slider-container.below').outerHeight(); var heightSum = mastheadHeight + sliderAboveHeight + sliderBelowHeight - navbarFixedTopHeight; $('html, body').animate({ scrollTop: heightSum }, 850, 'easeInOutExpo'); }); });Hope that helps.
September 23, 2016 at 9:41 am #1187966
sirnarcisParticipantSeptember 23, 2016 at 12:32 pm #1188157
Nabeel AModeratorHi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
September 26, 2016 at 7:56 am #1190766
sirnarcisParticipantThis reply has been marked as private.September 26, 2016 at 11:45 am #1191075
RahulModeratorHey There?
Thanks for writing back!
Upgrading your x theme and its plugins should fix the problem. (We could see 21 updates on your site. Kindly update the Theme and Plugins to their respective latest versions).
Let us know how it goes!
September 27, 2016 at 11:02 am #1192509
sirnarcisParticipantStill not working. I’m going to recap what I have done. Still doesn’t show the arrow icon neither scrolls.
I have added the HTML for the arrow on the slider:
<div style=”margin-top:85px”>
<i class=”x-icon-angle-down”></i>
</div>Then this html where I want to scroll:
<div style=”margin-top: 20px; color: #eb6909; font-weight: bold; line-height: 100%;”>and the JS you suggested:
jQuery(function($) {//
// Slider below.
//$(‘.home .x-slider-scroll-bottom’).on(‘touchstart click’, function(e) {
e.preventDefault();
var mastheadHeight = $(‘.masthead’).outerHeight();
var navbarFixedTopHeight = $(‘.x-navbar-fixed-top-active .x-navbar’).outerHeight();
var sliderAboveHeight = $(‘.x-slider-container.above’).outerHeight();
var sliderBelowHeight = $(‘.x-slider-container.below’).outerHeight();
var heightSum = mastheadHeight + sliderAboveHeight + sliderBelowHeight – navbarFixedTopHeight;$(‘html, body’).animate({
scrollTop: heightSum
}, 850, ‘easeInOutExpo’);});
});
September 27, 2016 at 8:26 pm #1193233
Paul RModeratorHi,
I was able to fix it by changing the code to this.
<div style="margin-top:85px"><a href="#assure" class="x-slider-scroll-bottom bottom center"><i class="x-icon-angle-down" data-x-icon=""></i> </a></div>Kindly check n your end.
Thanks
September 28, 2016 at 5:10 am #1193645
sirnarcisParticipantThanks that actually works!
Can I ask one last request? I can’t seem to understand how could I actually make that arrow to be on the right hanside in the bottom, and that scrolls down.
I miss understood my client. See below photoshop image to understand what I’m after.
Thanks,
Narcis
September 28, 2016 at 5:59 am #1193682
ChristopherModeratorHi there,
Please add text element and insert following code :
<div style="margin-top:85px"><a href="#assure" class="x-slider-scroll-bottom bottom right"><i class="x-icon-angle-down" data-x-icon=""></i> </a></div>Hope it helps.
September 28, 2016 at 6:30 am #1193724
sirnarcisParticipantIt didn’t work. 🙁
And by adding the text element has added some space and now I can’t click to edit on the text element 🙁
I have added it after the 4 boxes.
Where do I add the text element?
September 28, 2016 at 6:55 am #1193748
ChristopherModeratorHi there,
Please update your code to :
<div style="margin-top: 20px;color: red;position: relative;top: 33px;bottom: 0;left: 21%;"><a href="#assure" class="x-slider-scroll-bottom bottom right" style="color: red;"><i class="x-icon-angle-down" data-x-icon=""></i><br> </a></div>Instead of
assureadd next section’s id.The code gives you result like attachment.
Hope it helps.
September 28, 2016 at 7:15 am #1193771
sirnarcisParticipantI’m sorry but I’m not managing!
Nothing appears on the screen and the section adds a space below only. 🙁
September 28, 2016 at 8:29 am #1193902
Paul RModeratorHi,
I went ahead and added it.
Please check your homepage.
Thanks
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1187774 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
