$(this).attr() trouble
$(document).ready(function() {
$(".alert").click(function() {
{
var id = $(this).attr("id");
alert(id);
$(id).dialog();
return false;
}
});
});
Ok it's alerting the id AFTER it alerts an undefined.. so it alerts "undefined" and then "5" or whatever the number may be.
What am I doing wrong?
Tenaciousmug
Junior Poster in Training
53 posts since Jun 2010
Reputation Points: 10
Solved Threads: 2