solved: bind to taphold: "this" does not reference as expected

solved: bind to taphold: "this" does not reference as expected

Hi

I have a listview where every li-element has an href with an id:
  1. $.getJSON("Projektliste.php?callback=?", function(data) { 
  2. $.each(data, function(key, value) {
  3. $("<li><a href='Projekt.html?id=" + value.id +"' rel='external' id=" + value.id + ">" + value.PrName + "</a><span class='ui-li-count'>" + value.AnzBeob + "</span></li>").appendTo("#Projektlisteneintraege");
  4. });
  5. $("#Projektlisteneintraege").listview("refresh");
  6. });
I try to open a menu when the user tapholds a list-item:
  1. $('div').bind('taphold', function(event){
  2. var PrId = $(this).attr('id');
  3. alert("Die ID lautet: " + PrId);
  4. $.mobile.changePage("Projektliste_menu.html?id=" + PrId);
  5. });
I want to pass an id of the list-item that was tapheld. With this, it is possible to alter or delete list-items (and their data) in the menu.

The problem is: although every list-item has "id=" with a value, $(this).attr('id') does not fetch it.

This puzzles me, because I know that every list-item has a value in the id. And on another page I use the .change event which uses $(this).attr('id') too and that works perfectly:
  1. $("input").change(function() { 
  2. var Feldname = $(this).attr("id");
Here's the page:  http://evab.barbalex.ch/

Help is very much appreciated!