Javascript examples for jQuery:Link
alter css of one div by toggle() by clicking an outside link via jQuery click()
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.4.js"></script> <script type="text/javascript"> $(window).load(function(){/*from w w w . ja v a 2 s . c om*/ $('#one').click(function(){ $('#two').toggle() }) }); </script> </head> <body> <a id="one" href="#">click</a> <h3 id="two"> <a href="#">link</a> </h3> </body> </html>