hi, i am not sharing code. the problem is in this code please take a look. (problem: I want to open facebox every time when post even come from ajax facebox is not working properly. I want to ask how to use jQuery delegation event with this event? )
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="facebox/facebox.css" type="text/css" />
</head>
<body>
<ul id="items">
<li> <a href='#'> Clone Object </a> </li>
<li> <a href='#test' rel='facebox'> Click to open facebox </a> </li>
</ul>
<div id="test" style="display:none;">this is my test div</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="facebox/facebox.js"></script>
<script type="text/javascript">
jQuery('a[rel*=facebox]').facebox();
$("#items li").delegate('a', 'click', function(){
$(this).parent().append('<li><a href="#test" rel="facebox"> New Element ( problem: it should open facebox) </a></li>');
return false;
});
</script>
</bdoy>
</html>