matzoballed
06-25-2012, 11:06 AM
Hi there
I'm customizing a template in wordpress, and the author has written a bit of javascript which changes a box colour on mouseover.
Problem is that when I try to change the mouseover/mouseout colours - it reverts back to the template default.
I have checked every single php file which the bit of script appears in and have changed that to the colours I want - yet it still reverts to the default.
I am a complete noob when it comes to JS so can someone show me where I am going wrong?
This is the bit of code:
echo '<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("div#fbox_35").mouseover(function(){
$(this).css("background-color","#274068;");
});
$("div#col1.box").mouseout(function(){
$(this).css("background-color","#274068");
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$("div#fbox_34").mouseover(function(){
$(this).css("background-color","#91a833");
});
$("div#fbox_34").mouseout(function(){
$(this).css("background-color","#91a833");
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$("div#fbox_33").mouseover(function(){
$(this).css("background-color","#27b1ce");
});
$("div#fbox_33").mouseout(function(){
$(this).css("background-color","#23c2e3");
});
});
</script>' . "/n";
}
The colours are the colours I want them changed to - but it seems to still be calling the script from an earlier version..
Any advice I would very much appreciate!
I'm customizing a template in wordpress, and the author has written a bit of javascript which changes a box colour on mouseover.
Problem is that when I try to change the mouseover/mouseout colours - it reverts back to the template default.
I have checked every single php file which the bit of script appears in and have changed that to the colours I want - yet it still reverts to the default.
I am a complete noob when it comes to JS so can someone show me where I am going wrong?
This is the bit of code:
echo '<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("div#fbox_35").mouseover(function(){
$(this).css("background-color","#274068;");
});
$("div#col1.box").mouseout(function(){
$(this).css("background-color","#274068");
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$("div#fbox_34").mouseover(function(){
$(this).css("background-color","#91a833");
});
$("div#fbox_34").mouseout(function(){
$(this).css("background-color","#91a833");
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$("div#fbox_33").mouseover(function(){
$(this).css("background-color","#27b1ce");
});
$("div#fbox_33").mouseout(function(){
$(this).css("background-color","#23c2e3");
});
});
</script>' . "/n";
}
The colours are the colours I want them changed to - but it seems to still be calling the script from an earlier version..
Any advice I would very much appreciate!