Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

How freeze the first column upon scrolling for BrowseForm

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
miasoft
Posts: 156
Joined: Wed Dec 23, 2020 12:28 pm
Location: Russia, Volgograd
Has thanked: 32 times
Been thanked: 7 times
Contact:

How freeze the first column upon scrolling for BrowseForm

Unread post by miasoft »

In CodeLib we have freeze for SubForm:
2020-08-30: Subform: Freeze the first column upon scrolling horizontally

But how freeze one for BrowseForm?
Wbr, miasoft.
kev1n
nuBuilder Team
Posts: 4301
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: How freeze the first column upon scrolling for BrowseFor

Unread post by kev1n »

Maybe like this?

Code: Select all

if (nuFormType() == 'browse') {

    $(window).scroll(function(e) {

        var scrollLeft = $(window).scrollLeft();

        $("[data-nu-column='0']").each(function() {
            if (scrollLeft > 0) {
                $(this).css({ 'left': scrollLeft, 'z-index': '100' });
            } else {
                $(this).css({ 'left': 3, 'z-index': '0'});
            }
        });
		
    });

}
miasoft
Posts: 156
Joined: Wed Dec 23, 2020 12:28 pm
Location: Russia, Volgograd
Has thanked: 32 times
Been thanked: 7 times
Contact:

Re: How freeze the first column upon scrolling for BrowseFor

Unread post by miasoft »

kev1n wrote:Maybe like this?
Tnx! It's works|
Wbr, miasoft.
Post Reply