-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
If the overlay have a lot of text, after create it I try to use Jquery animate after but doesnt work like:
var jPopupDemo = new jPopup({
content: $('.worlds-popup').html()
});
$('html, body').velocity({
scrollTop: $('.JPopup '+"#"+$(this).attr('data-goto')).offset().top
}, 2000);
...so I extend the Jpopup like this code...but doesnt work too..
` open: function open(params) {
jPopup(params);
},
goTo: function goTo(id) {
console.log('custom '+id);
console.log($(".jPopup #"+id).offset().top);
var $container = $(".jPopup");
var $scrollTo = $(".jPopup #"+id);
$container.animate({scrollTop: $scrollTo.offset().top - $container.offset().top + $container.scrollTop(), scrollLeft: 0},300);
/*$('.JPopup #testID').animate({
scrollTop: $(".jPopup #"+id).offset().top
}, 2000);*/
}`
Any ideas?
Metadata
Metadata
Assignees
Labels
No labels