Many time i have found a lot of solution on this pages and thanks for every help! I hope i can found one more new! :-)
I need change logo in header, Now, when js work make a new class, with css I make a new layout but the logo is in php file...
So: when the page scroll the header change, but i can not change the logo in the header because is in php and with the css i cann't found a solution
This is the php code:
<!-- header -->
<header class="header clear" role="banner">
<!-- logo -->
<div class="logo">
<a href="<?php echo home_url(); ?>">
<img src="<?php echo get_template_directory_uri(); ?>/img/logo.png" alt="Logo" class="logo-img">
</a>
</div>
<!-- /logo -->
this is the js (i don't know if need to know)
$(document).ready (function () {
$(window).scroll (function () {
var sT = $(this).scrollTop();
if (sT >= 100) {
$('.header').addClass('cambio_header')
}else {
$('.header').removeClass('cambio_header')
}
})
})
Some one have idea how write the php? (the web site is make whit Wordpress)
Thanks so much!
srcattribute. e.g.$('.header .logo img').attr('src','something');