javascript - Hover over image effects -


i developing web site , , have problem , need write javascript code enable images once hovered become larger others , display additionally several lines of text regarding product on image. have looked on article https://css-tricks.com/a-really-nice-way-to-handle-popup-information/ not solving problem. can please advise?

what want fancybox though works on click, not on hover you'll have add bit of code make work on hover have below

note: while possible (as shown here) make work on hover, not recommended. put bunch of these on page , pretty annoying real quick!

here simple example, or see snippet below

$(document).ready(function() {      $("a#inline").fancybox({  		'hideoncontentclick': true  	});      // add bit below make work on hover      $(".hoverclick").hover(function(){  		$(this).click();  	});              });
<link rel="stylesheet" href="http://dodsoftware.com/sotests/fancy/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>  <script type="text/javascript" src="http://dodsoftware.com/sotests/fancy/jquery.fancybox-1.3.4.js"></script>  <script type="text/javascript" src="http://dodsoftware.com/sotests/fancy/jquery.easing-1.3.pack.js"></script>  <script type="text/javascript" src="http://dodsoftware.com/sotests/fancy/jquery.mousewheel-3.0.4.pack.js"></script>    <a id="inline" class="hoverclick" href="#data"><img alt="" src="http://farm9.staticflickr.com/8366/8483546751_86494ae914_m.jpg"> </a>    <div style="display:none">      <div id="data">      <img alt="" src="http://farm9.staticflickr.com/8366/8483546751_86494ae914_m.jpg"><br>          <h3>my cool title</h3>          <p>put cool item descrtiption here</p>     </div>  </div>


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -