How to block/freeze an embedded Pinterest board fr

2019-08-18 06:57发布

I have a Pinterest board embedded, which is taking the complete width at the top of the page.

I want that if I scroll down, the page itself directly scrolls down; not the embedded Pinterest board.

I've tried with this:

#pinterest-container > span {
    overflow: hidden;
}

but the board is still scrollable.

I have also tried with javascript, but somehow it is not being inserted in my html. Neither:

var getThis = $('#pinterest-container > span:eq(0) > span:eq(1) > span:eq(0)');
$(getThis).css("overflow", "hidden");

nor:

var getThis = $('#pinterest-container > span:eq(0) > span:eq(1) > span:eq(0)');
$(getThis).addClass("hide-overflow");

And here a jsfiddle: https://jsfiddle.net/w57osokq/

Any idea of how to do it?

1条回答
可以哭但决不认输i
2楼-- · 2019-08-18 07:57

This post showed me the way:

The container of the Pinterest board with the scrollbar is <span class="PIN_xxxxx_bd" ...>. Then, the following CSS is needed:

<style>
    #pinterest-container [class$=_bd] {
        overflow-y: hidden;
    }
</style>
查看更多
登录 后发表回答