Introduction to some settings of jquery easyui scroll bar_jquery
May 16, 2016 pm 05:22 PMWhen using the dialog plug-in, the screen is centered by default. However, when the scroll bar appears on the page, the dialog does not scroll down with the scroll bar. At this time, the user needs to slide the scroll bar to position the dialog. This is not humane. Before coming up with the solution, let’s popularize several jquery positioning methods
//Get the height of the browser display area
$(window).height();
//Get the width of the browser display area
$(window).width();
//Get the document height of the page
$(document.body).height();
//Get the document width of the page
$(document.body).width();
//Get the vertical height of the scroll bar to the top
$(document).scrollTop();
//Get the vertical width of the scroll bar to the left
$(document).scrollLeft( ; Call the panel's move function to move the dialog
where $(window).height()-250, where 250px is the width of the dialog.

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Detailed explanation of jQuery reference methods: Quick start guide

How to use PUT request method in jQuery?

How to remove the height attribute of an element with jQuery?

jQuery Tips: Quickly modify the text of all a tags on the page

Use jQuery to modify the text content of all a tags

In-depth analysis: jQuery's advantages and disadvantages

Understand the role and application scenarios of eq in jQuery

How to tell if a jQuery element has a specific attribute?
