Tagged: x
-
AuthorPosts
-
December 14, 2016 at 6:34 am #1292607
dbvParticipantHi,
I would like the logo to change when scrolling down. I’ve had success with this script I found but I don’t know how to control the size and placement of the second logo.
(function($){ $(window).bind('scroll', function() { if ($(this).scrollTop() > 600) { $('.x-navbar .x-brand img').attr('src','http://www.digitalabildverkstan.se/test/wp-content/uploads/2016/10/dbv_mark_black.png'); }else{ $('.x-navbar .x-brand img').attr('src','http://www.digitalabildverkstan.se/test/wp-content/uploads/2016/10/dbv_logo.png'); } }); })(jQuery); jQuery(document).ready(function($) { $(window).scroll(function() { var scrollPos = $(window).scrollTop(), navbar = $('.x-navbar'); if (scrollPos > 1100) { navbar.addClass('alt-color'); } else { navbar.removeClass('alt-color'); } }); });December 14, 2016 at 8:18 am #1292731
ThaiModeratorHi There,
Please add the following CSS:
.x-navbar.alt-color .x-brand img { width: 150px; }Hope it helps.
December 15, 2016 at 5:02 am #1294057
dbvParticipantHi,
Sorry, no effect. The logo still the same size.
December 15, 2016 at 5:45 am #1294088
Paul RModeratorHi,
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 / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1292607 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
