Эффект Скейла. Scale Effect.
Описание: Сжимает или увеличивает элемент в заданном процентом соотношении.Description: Shrink or grow an element by a percentage factor.
Теория
Тесты по теории можно посмотреть здесь.
• scale
◦ direction (default: "both") :: Направление, по умолчанию "both" - в обе стороны.
Type: String (Строка)
The direction of the effect. Possible values: "both", "vertical" or "horizontal".
Направление эффекта. Возможные значения: "both" (в обе стороны), "vertical" (вертикально) or "horizontal" (горизонтально).
◦ origin (default: [ "middle", "center" ])
Type: Array (Массив)
The vanishing point. Точка исчезновения.
◦ percent
Type: Number (Число)
The percentage to scale to. Значение в процентах для изменения размера.
◦ scale (default: "both")
Type: String (Строка)
Which areas of the element will be resized: "both", "box", "content". Box resizes the border and padding of the element; content resizes any content inside of the element.
Какие области элемента будут подвергнуты изменению размера: "both" (оба), "box" (обрамление), "content" (содержание). Обрамление ("box") - изменение размера коснется границ и прослойки границ (padding) элемента. Содержание ("content") - изменение размера коснется любого контента внутри элемента.
Examples: (Примеры: )
Example: Toggle a div using the scale effect.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <!doctype html><html lang="en"><head> <meta charset="utf-8"> <title>scale demo</title> <style> #toggle { width: 100px; height: 100px; background: #ccc; } </style></head><body><p>Click anywhere to toggle the box.</p><div id="toggle"></div><script>$( document ).click(function() { $( "#toggle" ).toggle( "scale" );});</script></body></html> |
Этот пример можно посмотреть здесь.
Example: Toggle a div using the scale effect in just one direction.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <!doctype html><html lang="en"><head> <meta charset="utf-8"> <title>scale demo</title> <style> #toggle { width: 100px; height: 100px; background: #ccc; } </style></head><body><p>Click anywhere to toggle the box.</p><div id="toggle"></div><script>$( document ).click(function() { $( "#toggle" ).toggle({ effect: "scale", direction: "horizontal" });});</script></body></html> |
Этот пример можно посмотреть здесь.












