Javascript examples for jQuery Method and Property:css
Hide div with javascript when there is no link
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.8.3.js"></script> </head> /*from w w w . ja v a 2s. c o m*/ <body> <div class="pages"> asdf </div> <div class="pages2"> <a href="#">asdf</a> asdf </div> <script type="text/javascript"> $('.pages:not(:has(>a))').css("display", "none"); </script> </body> </html>