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:
- <script>
- $(document).ready(function() {
- $('#gallery').galleryView({
- gallery_width: 200,
- gallery_height: 398,
- frame_width: 120,
- frame_height: 90,
- pause_on_hover: true
- });
- });
- </script>
but in my case, I load the site which include the div structure ..
- <ul id="gallery">
- <li><img src="images/portfolio/01.jpg" alt="image1" /></li>
- <li><img src="images/portfolio/02.jpg" alt="image2" /></li>
- <li><img src="images/portfolio/03.jpg" alt="image3" /></li>
- </ul>
over an ajax call and try to initialise the GalleryView in the callback function ...
- function loadPage (file){
- $.get('inc/'+file+'.html', function(data) {
- $('#displayContent').html(data);
- $('#gallery').galleryView({
- gallery_width: 200,
- gallery_height: 398,
- frame_width: 120,
- frame_height: 90,
- pause_on_hover: true
- });
- });
- }
but it doesn't work ..
Same problem in this code example:
- $(document).ready(function() {
- $('a').click(function()
- {
- $('#gallery').galleryView({
- gallery_width: 200,
- gallery_height: 398,
- frame_width: 120,
- frame_height: 90,
- pause_on_hover: true,
- fade_panels: false
- });
- });
- });
I hope someone can help me.
best regards
edel