initialization galleryview in ajax callback

initialization galleryview in ajax callback

Hi,
I use the JQuery GalleryView-Plugin http://spaceforaname.com/galleryview. The initialization works fine if i use this code:

  1. <script>
  2. $(document).ready(function() {
  3.             $('#gallery').galleryView({
  4.             gallery_width: 200,
  5.             gallery_height: 398,
  6.             frame_width: 120,
  7.             frame_height: 90,
  8.             pause_on_hover: true
  9.         });
  10.     });
  11. </script>

but in my case, I load the site which include the div structure ..

  1.         <ul id="gallery">
  2.             <li><img src="images/portfolio/01.jpg" alt="image1" /></li>
  3.             <li><img src="images/portfolio/02.jpg" alt="image2" /></li>
  4.             <li><img src="images/portfolio/03.jpg" alt="image3" /></li>
  5.         </ul>

over an ajax call and try to initialise the GalleryView in the callback function ...

  1.  function loadPage (file){
  2.      $.get('inc/'+file+'.html', function(data) {
  3.             $('#displayContent').html(data);
  4.             $('#gallery').galleryView({
  5.                   gallery_width: 200,
  6.                   gallery_height: 398,
  7.                   frame_width: 120,
  8.                   frame_height: 90,
  9.                   pause_on_hover: true
  10.               });
  11.           });
  12.     }

but it doesn't work ..

Same problem in this code example:
  1.     $(document).ready(function() {
  2.         $('a').click(function()
  3.         {
  4.             $('#gallery').galleryView({
  5.             gallery_width: 200,
  6.             gallery_height: 398,
  7.             frame_width: 120,
  8.             frame_height: 90,
  9.             pause_on_hover: true,
  10.             fade_panels: false
  11.         });
  12.         });
  13.     });
I hope someone can help me.

best regards
edel