Find hrefs that contain multiple strings - Javascript jQuery

Javascript examples for jQuery:String

Description

Find hrefs that contain multiple strings

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.3.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//from ww w .j  a  v a  2 s .co  m
$('a[href*="example.com"]').filter('a[href*="vendor_id"]').remove();
    });

      </script> 
   </head> 
   <body> 
      <a href="example.com?vendor_id">remove</a> 
      <a href="example.com?">don't remove</a>  
   </body>
</html>

Related Tutorials