jquery - Integrating Galleria with SmoothDivScroll plugin -


i have been working on integration of smoothscrolldiv galleria.. - scroll thumbnails.

demo of code here: http://test.kinkylemon.nl/sym/galleria/demo3.htm

i have problem when browser window resized, smoothscrolldiv no longer correctly bound dom ...or ! - stops working.

also similar bug in ie6 @ page load (with empty cache).

so question a. need use bind() or live() somehow?

    $(function($) { $('ul#gallery').galleria({             history   : false, // activates history object bookmarking, back-button etc.             clicknext : true, // helper making image clickable             insert    : '#galleriacontentbox', // containing selector our main image             onimage   : function(image,caption,thumb) { // let's add image effects demonstration purposes                  // fade in image & caption                 if(! ($.browser.mozilla && navigator.appversion.indexof("win")!=-1) ) { // ff/win fades large images terribly slow                     image.css('display','none').fadein(1000);                 }                  // fetch thumbnail container                 var _li = thumb.parents('li');                  // fade out inactive thumbnail                 _li.siblings().children('img.selected').fadeto(500,0.3);                  // fade in active thumbnail                 thumb.fadeto('fast',1).addclass('selected');                  // add class landscape images allowing margin                 if (image.height() < image.width()) {                     $('#galleriacontentbox').addclass('landscape');                 } else {                     $('#galleriacontentbox').removeclass('landscape');                 }              },             onthumb : function(thumb) { // thumbnail effects goes here                  // fetch thumbnail container                 var _li = thumb.parents('li');                  // if thumbnail active, fade way.                 var _fadeto = _li.is('.active') ? '1' : '0.3';                  // fade in thumbnail when finnished loading                 thumb.css({display:'none',opacity:_fadeto}).fadein(1500);                  // hover effects                 thumb.hover(                     function() { thumb.fadeto('fast',1); },                     function() { _li.not('.active').children('img').fadeto('fast',0.3); } // don't fade out if parent active                 )             }         });     });       $(document).ready(function() {         //$(function() {             $("div#smallscroller").smoothdivscroll({                 scrollablearea: "ul.scrollablearea", //the identifier of actual element scrolled left or right.                 mousedownspeedbooster: 2,                 scrollingspeed: 25,                 autoscrolldirection: 'endlessloop'                 //visiblehotspots: 'always'             });         //});     }); 

.. , question b. ... saw following at: http://maaki.com/thomas/smoothdivscroll/ - problem ? - should use different plugin? ..maybe rebuild jcarousel

"smooth div scroll doesn't recalculate scrollable area. recalculation done first when user resizes browser window. looking @ source code there's function called "windowisresized". triggered when user resizes browser window , (among other things) recalculates width of scrollable area. code should rewritten general function "reinitializes" scroller. function should part of public api can called developer after ajax content load has been done."

question b right 1 - problem smoothdivscroll plugin needs update windowisresize function

i rebuilt jcarousel - works nice. still looking way replicate mouseover functionality achieved smoothdivscroll - not possible jcarousel seems..


Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -