shadowbox with dynamic links loaded

classic Classic list List threaded Threaded
2 messages Options
jan
Reply | Threaded
Open this post in threaded view
|

shadowbox with dynamic links loaded

jan
Hi!

Shadowbox works well on my landing page. However, on that shadowbox I have another set of links loaded dynamically via jquery ajax. So:

1. landing page (contains dynamic links that will no longer use shadowbox), shadowbox works when clicking each of the items loaded dynamically via jquery ajax!
2. On shadowbox window, another set of dynamic links are produced that are clickable via regular ajax call using jquery  but this time shadowbox is no longer used when clicking each item from this set, hence the code now below:

/* shadowboxed page: */
function mycarousel_getItemHTML(url)
{
        var urlarr = url.split('.');
        var urllarge = urlarr[0]+'_large' + '.' + urlarr[1];
       
  return '<a rel="shadowbox[clientwork];optios={counterType:\" skip\",continuous:true,animSequence:\"sync\"}" href=\"#\"><img src="' + url + '" width="60" height="60" alt="" border=0 />';
};



jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        itemLoadCallback: mycarousel_itemLoadCallback
    });
});


function showpreview ( thisurl ){ ... }


the point of error is the return string from the above function (return '<a rel='shadowbox....)

I get "missing ) after argument list", hence function showpreview() does not get called. urllarge will just provide a relative path string to an image eg: (carousel/1_large.jpg)

i do not get this error, no matter how look at it the syntax seems to be correct...

THanks in advance!





Reply | Threaded
Open this post in threaded view
|

Re: shadowbox with dynamic links loaded

build
Please post a link to online example.

i am on holidays but will try to look at it asap meanwhile firebug is your best friend.

beers,
build