javascript - Change content of one div when hovering on another in a different place -


please help, trying change content in 1 div when mouse on over image in div. im trying use this:-

$(document).ready(function(){  // icons $('#iconone img').mouseover(function(){     $('#stop').css('display', 'inline-block');  }); $('#iconone img').mouseout(function(){     $('#stop').css('display', 'inline-block'); });  // box 2 $('#icontwo img').mouseover(function(){     $('#stop').css('display', 'none');     $('#shop').css('display', 'inline-block'); }); $('#icontwo img').mouseout(function(){     $('#stop').css('display', 'none');     $('#shop').css('display', 'inline-block'); });  // box 3 $('#iconthree img').mouseover(function(){     $('#stop').css('display', 'none');     $('#shop').css('display', 'none');     $('#select').css('display', 'inline-block'); }); $('#iconthree img').mouseout(function(){    $('#stop').css('display', 'none');     $('#shop').css('display', 'none');     $('#select').css('display', 'inline-block'); }); }); </script> 

if gratefull! guys :d

you may want use hover ? http://api.jquery.com/hover/

example: http://jsbin.com/kodiy/1/

var div1, div2;  div1 = $('.div1');  div2 = $('.div2');  div1.hover(function() {   div2.hide(); }, function() {   div2.show(); }); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -