Footer kısmındaki jquery kodları bu şekilde;
<script>
var methodOne = function (){
function ofsetTop($item){
var ot = $item.offset();
return ot.top;
}
function changeColored ($whois, $isColor) {
$whois.css({
'background' : $isColor
});
}
function changeColor ($whois, $isColor) {
$whois.css({
'color' : $isColor
});
}
return {
render : function (){
var item = $("section:eq(1)"),
thisIt = $(window),
changeItem = $("header"),
color = "#ef3acd";
$(document).scroll(function () {
var scx = $(window).scrollTop();
console.log(scx);
if( scx >= ofsetTop(item) ){
changeColored ( changeItem, color );
changeColor ($("a"), "red");
}else{
changeColored ( changeItem, "" );
changeColor ($("a"), "blue");
}
});
}
}
}();
var methodTwo = function(){
function ofsetTop($item){
var ot = $item.offset();
return ot.top;
}
function changeLogo ($whois, $isImage) {
$whois.attr("src",$isImage);
}
function changeColored ($whois, $isColor) {
$whois.css({
'color' : $isColor
});
}
return {
render : function (){
var item = $("section:eq(1)"),
thisIt = $(window),
changeItem = $("header img"),
logo = "https://www.google.com.tr/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png",
Newlogo = "https://wmaraci.com/resimler/logolar/logo.png";
$(document).scroll(function () {
var scx = $(window).scrollTop();
if( scx >= ofsetTop(item) ){
changeLogo ( changeItem, Newlogo );
changeColored ($("a"), "red");
}else{
changeLogo ( changeItem, logo );
changeColored ($("a"), "blue");
}
});
}
}
}();
$(document).ready(function(){
//methodOne.render();
methodTwo.render();
})
</script>
<script></script>
<script>/js/jquery.onepage-scroll.min.js"></script>
<script>/js/main.js"></script>