<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" name="viewpot" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" type="text/css" href="css/bootstrap.css" /> </head> <body> <nav class="navbar navbar-default"> <div class="container-fluid"> </div> </nav> <div class="col-md-6 well"> <hr style="border-top:1px dotted #ccc;"/> </div> </body> </html>
$(document).ready(function(){ $('a img').hover(function(){ $(this).stop().animate({opacity: 1}, 300); }, function(){ $(this).stop().animate({opacity:.3}, 500); }); $('a img').animate({ opacity:.3 }); });