[php]<script>
jQuery( document ).ready(function() {
if(jQuery(window).width() < 481){
jQuery(‘#logo’).attr(‘src’,’https://www.yoursite.com/wp-content/uploads/yourlogo.jpg’);
}else if(jQuery(window).width() > 480){
jQuery(‘#logo’).attr(‘src’,’https://www.yoursite.com/wp-content/uploads/yourlogo-2.jpg’);
}
});
</script>
[/php]
Change Logo on Mobile – Divi Theme
If you want to add a different logo to your header for different screen resolutions, you can use the code below. Change the URLs to point to your images. You can also adjust the width value to whatever you like.
Need help with this?
Hire me for a consultation and I'll walk you thru the process.
0 Comments