Now the code looks like this:
Click
function searchSubmit() {$.ajax({ type: "POST",url: "gni_ajax.asp",data: "query=" + $("#search").val(),success: function(data){$("#results").empty();$("#results").append(data);return false;}});};$('#search').keypress(function(event) {if (event.keyCode == '13') {searchSubmit();}});$("#search-button").click(function () { searchSubmit(); });$("#dialog-form").dialog({autoOpen: false,height: 400,width: 400,modal: true,buttons: {"Отмена": function() {$( this ).dialog("close");}},close: function() {alert("i'm closing!");}});$("#address-select").click(function() {$( "#dialog-form" ).dialog( "open" );});$(".addr").click(function() {alert($(this).text());alert(this.id);$("#dialog-form").dialog("close");});
I had to when you click on one of the links returned by Ajax (different id numbers and texts of one class .addr, the text and the values inserted in the input. But to achieve that, I could not. Decided to at least see what will give alert. But he also showed no response to clicking no. If the hang up event on tap address-select, then everything works fine. But these links inside the dialog which is not working. Not that alert, but the dialogue is not closed. Even if you specify not ".addr", but simply "a" Checked in firebug, the elements are created normally:
Moscow g
What to do with it? It should work the same!