jQuery 1.4.x and the @ symbol

前端 未结 1 1674
挽巷
挽巷 2021-01-24 08:49

I used to use this script for jquery email obfuscation:

    $(\".replaceAt\").replaceWith(\"@\");
  $(\".obfuscate\").each(function () {
        $(this).attr(\"h         


        
相关标签:
1条回答
  • 2021-01-24 09:20

    So I dug around in the jQuery release notes, and it might be related to this bug which was fixed in the 1.4.2 release. At any rate, I can verify that your script works great in 1.4.2. Hope this helps.

    Edit:

    $(document).ready(function() {
      $(".replaceAt").replaceWith("@");
      $(".obfuscate").each(function () {
        $(this).attr("href", "mailto:"+$(this).text());
       });
    });
    
    0 讨论(0)
提交回复
热议问题