views:

19

answers:

0

Hi, I'm using jquery captify to show a Change Picture link when users hover over their avatar, and I want the link to open a modal window using Colorbox. For some reason, I can't seem to bind colorbox to this link on first page load. If I click the link, the default event is not prevented and a new page is loaded - if i press the back button, then the colorbox event is now bound to the Edit Picture link. Trying to figure out how to make this happen on page load - any ideas? Thanks!

 $(document).ready(function(){

            $('img.captify').captify({
                // caption span % of the image
                spanWidth: '90%'
            });

            $('a.pic_manager').click(function(){
                $(this).colorbox({href:$(this).attr('href')});
                return false;
            });
        });