Question : jQuery Button Ajax problem

My Ajax request brings back new html and my buttons aren't functioning the same on the new html.  ".live()" will work for my hover function, but the problem is when the script originally loads, it calls the button style and sets the css display as none.  Anyway, because there is no event for this, I'm having issues.  I'm just looking for the buttons to display the same as when the page first loads. Thanks for the help.

http://www.pltproject.org/testing18/test_shit/dialog_ajax_test.php
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
$(function() {
		
		$("button").button().css('display', 'none');
		$('.wall_post').live('mouseover mouseout', function(event) {
  			if (event.type == 'mouseover') {
    			$("button", this).css('display', 'block');	
		  } else {
				$("button", this).css('display', 'none');
		  }
});

Answer : jQuery Button Ajax problem

Hmm... can you try to add it again after the ajax request see the attached

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
var data_part1 = "";
$(function() {      
		$("#comment_dialog").dialog({
			autoOpen: false,
			height: 180,
			width: 560,
			modal: true
		});
		$(".faux_link").live('click', function() {
				$('#comment_dialog').dialog('open');
				data_part1 = $(this).attr('name');
		});
		$("#add_comment_button").live('click', function() {
					$("#comment_dialog").dialog('close');
					var query_string = data_part1 + $('#comment_input').val();
					$.ajax({
						url: "../scripts/comment_dialog.php",
						dataType: "html",
						data: query_string,
						success: function(data){
							$('#wall_post_cont').html(data);
                            $("button").button().css('display', 'none'); 
						}
					});
		});
});
Random Solutions  
 
programming4us programming4us