jquery - JScrollPane (Custom Scrollbar) in a PopEasy Modal Window -



jquery - JScrollPane (Custom Scrollbar) in a PopEasy Modal Window -

first time posting :-) i've looked everywhere reply , can't seem find it. i'm not jquery expert way around.

popeasy: http://thomasgrauer.com/popeasy jscrollpane: http://jscrollpane.kelvinluck.com/index.html

i'm trying jsscrollpane work within of popeasy modal window. terminology might off, think need initilize after modal loads?

here's code popeasy modals: click link , modal shows:

$('.modallink').modal({ trigger: '.modallink', olay:'div.overlay', modals:'div.modal', animationeffect: 'fadein', animationspeed: 300, movemodalspeed: 'slow', openonload: false, docclose: true, closebyescape: false, moveonscroll: false, resizewindow: true, close:'.close-button' });

normally, jscrollpane be:

$('.scroll-pane').jscrollpane();

i'm assuming (and hoping) reply simple , i'm missing small, i've tried things don't understand yet like:

jquery(document).on('click','.modallink',function($){ $('.right-side').jscrollpane({}); });

i need help :-(

thanks guys!

since jscrollpane calculating container upon init init/reinit after modal loaded, since popeasy dosn't have api callbacks after modal loaded little bit tricky.

the easy poor way out add together timeout, so:

jquery(document).on('click','.modallink',function($){ settimeout(function(){ $('.right-side').jscrollpane({}); }, 500); });

the alternative add together callback functionality popeasy running callback after animation complete. if need reinitsialize need access jscrollpane api so:

$(function() { var pane = $('.right-side'); pane.jscrollpane({}); var api = pane.data('jsp'); jquery(document).on('click','.modallink',function($){ settimeout(function(){ api.reinitialise(); }, 500); }); });

jquery modal-dialog scrollbar jscrollpane

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -