Posted By

cs2css3 on 05/13/10


Tagged

javascript jquery


Versions (?)

cs2css3's extention


 / Published in: jQuery
 

  1. $(function(){
  2. $("#contents a[href^='mailto']").after("<span class='iconmail'>&nbsp;</span>");
  3. $("#contents a[href$='pdf']").after("<span class='iconpdf'>&nbsp;</span>").click(function(){window.open(this.href, '_blank');return false;});
  4. $("#contents a[href$='xls']").after("<span class='iconxls'>&nbsp;</span>").click(function(){window.open(this.href, '_blank');return false;});
  5. $("#contents a[href$='doc']").after("<span class='icondoc'>&nbsp;</span>").click(function(){window.open(this.href, '_blank');return false;});
  6. $("#contents a[href^=http://]").not("#contents a[href^=thisPage], #contents a[href$='pdf'], #contents a[href$='xls'], #contents a[href$='doc']").after("<span class='extlink'>&nbsp;</span>").click(function(){
  7. window.open(this.href, '_blank');return false;
  8. });
  9. });

Report this snippet  

You need to login to post a comment.