In-depth analysis of jQuery's size adjustment component_jquery
WBOYOriginal
2016-05-16 17:31:511434browse
1: The Resizable component can turn the selected DOM element into a resizable object , that is, its size can be changed by dragging the adjustment handle. $(".selector").resizeable(options); Simple example:
In fact, after calling the resizable() method, div elements will be added to the right border, bottom border and lower right corner of the target object, and ui-resizable-e, ui-resizable-s, will be added to the div elements in sequence. ui-resizable-se class, thus forming a drag handle
ui is a jQuery object containing additional information. The jQuery object has the following properties: helper: a jQuery object representing a draggable helper element originalPosition: an object containing top attributes and left attributes, indicating the position of the element relative to the original object before starting to adjust originalSize: an object containing width and height attributes, indicating the size of the element before starting to adjust position : An object containing top attributes and left attributes, indicating the position of the current element relative to the original object size: An object containing width attributes and height attributes, indicating the size of the current element Simple example:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn