Issues with live() documentation

Issues with live() documentation

At http://api.jquery.com/live/ , the example at the bottom for custom events is:




 

<!DOCTYPE html>

<html>

<head>

  <style>

  p { color:red; }

  span { color:blue; }

  </style>

  <script src="/scripts/jquery-1.4.js"></script>

</head>

<body>

<p>Has an attached custom event.</p>

  <button>Trigger custom event</button>

  <span style="display:none;"></span>

<script>


    $("p").live("myCustomEvent", function(e, myName, myValue){

      $(this).text("Hi there!");

      $("span").stop().css("opacity", 1)

               .text("myName = " + myName)

               .fadeIn(30).fadeOut(1000);

    });

    $("button").click(function () {

      $("p").trigger("myCustomEvent");

    });


</script>

</body>

</html>





In the custom event, you'll notice two parameters: myName, myValue.  In doing some testing on my own, I found that myName is the selector, and myValue would be the value of it (if it had a value).

When I run the demo, though, it shows "myName = undefined", which initially threw me off.


Also, the documentation at the top states that I can pass event data, but I do not see any examples on the page that use this.


I did see some on the bind() page after digging around a bit.


Edit:  I am using Chrome 3.0 in case you were curious.