Change the color of body background when hovering on links
-
Hi Everybody,
I put the following script
<script>
jQuery(document).ready(function(){
jQuery("a").hover(function(){
jQuery("body").css('background-color','red');
});
jQuery("a").mouseleave(function(){
jQuery("body").css('background-color','white');
});});
</script>in “Custom <head> content” in order to change the color of body background when hovering on links.
That script only works with “a” links of nav menu, while for the “a” links in the #main-region we have problems.Could you help us resolve them?
It seems there is a conflict between loading of the dynamic content and our jquery event, isn’t it?Thanks
-
Hello baumiao please take a look at the other post where I answered your question:
http://laythemeforum.com:4567/topic/741/change-body-bgcolor-on-hovering-a-a-link/2Sorry for the late reply :O
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it