javascript - Is there anyway to hover over a link, and make that change an image or background image? -


this question has answer here:

i think best way css or javascript. im not sure possible.

all css have

html {     background: url(http://i.imgur.com/6oqxuwz.jpg) no-repeat center center fixed;     background-size: cover; }   /* unvisited link */ a:link {  }  /* visited link */ a:visited {  }  /* mouse on link */ a:hover {  }  /* selected link */ a:active {  } 

<script>  jquery('#link').hover(function()  {  jquery('body').css("background-image", "url('foo/bar.png')"); });  </script> 

you try above, # being id can change . use class. can use change elements of div changing body again #foo or .foo depending on whether you're using class or id. hope helps.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -