Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have been trying to make an extension with a scroll event, however the event doesn't seem to bind to the window object. Below is my code. Thoughts?
paint: function ($element, layout) {
//add your rendering code here
$element.empty();
let self = this;
var source = "'//open.spotify.com/embed?uri=" + layout.uri +"&theme=" + layout.theme + "'";
$element.html("<iframe src=" + source + " width=100% height=100% frameborder=0 allowtransparency=true></iframe>");
$( '<style>' ).html(xmas).appendTo( 'head' );
$('.object-and-panel-wrapper').addClass('fadein');
//$('.fadein').bind('DOMMouseScroll MouseScrollEvent MozMousePixelScroll wheel scroll', function(i){
$(window).scroll(function(e){ //Not working
var bottom_of_element = $(this).offset().top + $(this).outerHeight();
var bottom_of_window = $(window).scrollTop() + $(window).height();
if( bottom_of_window > bottom_of_element ){
$(this).animate({'opacity':'1'},1000);
}
});
});
var sheet = $('#grid-wrap');
sheet.addClass('r2');
sheet.addClass('r1');
//needed for export
return qlik.Promise.resolve();
}
Problem was a compatibility with scroll event in Edge, Needs to be bind to the 'wheel' event instead.
Problem was a compatibility with scroll event in Edge, Needs to be bind to the 'wheel' event instead.