Posted By

koetz on 03/15/10


Tagged

javascript jquery attribute


Versions (?)

Changing link attribute by jquery


 / Published in: jQuery
 

  1. <script type="text/javascript">
  2. // document ready
  3. $(document).ready(function(){
  4.  
  5. //change the target attribute to open in different tab
  6. //on the class texto, selector a
  7. $(".texto a").attr('target', '_blank');
  8. });
  9.  
  10. // @authors Lucas Koetz & Andre Luis
  11. // @country Brazil
  12.  
  13. </script>

Report this snippet  

You need to login to post a comment.