Custom HTML Tags

Custom HTML Tags

 
Now the script works great! I can easily copy anything within the <p> tags to the clipboard. (Seen below, to save you that extra click!)
 
  1. <html>
    <head>
  2. <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="jquery.copy.js"></script> 
  3. <script language='Javascript'>
  4. $(document).ready(function()
    {
     $("p").click(function()
     {
       $.copy($(this).text());
     });
    });





  5. </script>
    </head>
  6. <body>
  7. <p>A</p>
    <p>B</p>
    <p>C</p>
    <p>D</p>
    <p>E</p>



  8. </body>
    </html>
Is there any easy way of creating custom HTML commands to be interpreted by the script and get the same result?
 
For instance:
  1. $("copy").click(function()
     {
       $.copy($(this).text());
     });


  2. <copy>A</copy>
    <copy>B</copy>