Jim
Image link:
<a href='xxxx' class="gallery"><img src='xxx' border='0' /></a>
Code:
function xyz () {
$.ajax({
type: "GET",
url: "index.php",
data: "id=" + id,
success: function(output){
setTimeout(
function() {
$("#content")
.empty()
.append(output)
.fadeIn('slow', function(){ xxx })
}, 600);
}
});
//trying to apply fb to new images in content div??
$("a.gallery").fancybox();
}
success: function(output){
setTimeout(
function() {
$("#content")
.empty()
.append(output)
.fadeIn('slow', function(){
xyz;
$("a.fancybox").fancybox();
})
}, 600);
}
On Mar 23, 10:45 pm, Jim <jtbutle...@comcast.net> wrote:
> I have a fancybox question I have a page that is generated via an ajaxcall. That part works fine. However the page which is generated has a
> bunch of images I want to group together and display with fancybox. I
> have correctly applied the code to those images but the images just
> open in a new window. I also tried adding calling fancybox
> with .live() that was suggested in another post but it didnt work,
> perhaps I did it incorrectly. Below is an example of the type offunctionI am calling. Any input would be appreciated.
>
> Jim
>
> Image link:
> <a href='xxxx' class="gallery"><img src='xxx' border='0' /></a>
>
> Code:functionxyz () {
> $.ajax({
>
> type: "GET",
> url: "index.php",
> data: "id=" + id,
> success:function(output){
>
> setTimeout(
> function() {
> $("#content")
> .empty()
> .append(output)
> .fadeIn('slow',function(){ xxx })