Options
animation
Default value:
{open: 'swing', close: 'swing', openTime: 200, closeTime:200}
The animation to use to open and close the slide window widget.
open and close properties are type of String, and must be one of the jQuery easing types like 'swing'.
openTime: A number determining how long the opening animation will run in millisecs.
closeTime: A number determining how long the closing animation will run in millisecs.
Code examples
Initialize the slide window widget with the animation option specified, using object in constructor
$A.newSlideWindow({
animation: {
open: 'swing',
close: 'swing',
openTime: 200,
closeTime: 200
}
}).draw();
Initialize the slide window widget with the animation option specified, using method chaining
$A.newSlideWindow().animation({open:"swing",close:"swing",openTime:200,closeTime:200}).draw();
Get or set the animation option, after initialization
var slideWindow = $A.newSlideWindow().draw();
//Setter
slideWindow.animation({open:"swing",close:"swing",openTime:200,closeTime:200}); //returns slideWindow
//Getter
console.log(slideWindow.animation()); //returns value of animation
autoClose
If this option is set true the slide window widget will automatically close if you clik out of it.
If this option is set false the slide window widget won't close unless the tab is clicked.
Code examples
Initialize the slide window widget with the autoClose option specified, using object in constructor
$A.newSlideWindow({autoClose: true}}).draw();
Initialize the slide window widget with the autoClose option specified, using method chaining
$A.newSlideWindow().autoClose(true).draw();
Get or set the autoClose option, after initialization
var slideWindow = $A.newSlideWindow().draw();
//Setter
slideWindow.autoClose(true); //returns slideWindow
//Getter
console.log(slideWindow.autoClose()); //returns value of autoClose
content
Default value:
$('<div class="automizy-slide-window-content"></div>')
The content inside the widget can be any jQuery object, AutomizyJS form or HTML code.
Code examples
Initialize the slide window widget with the content option specified, using object in constructor
$A.newSlideWindow({
content: 'This will be the content'
}).draw();
Initialize the slide window widget with the content option specified, using method chaining
$A.newSlideWindow().content('This will be the content').draw();
Get or set the content option, after initialization
var slideWindow = $A.newSlideWindow().draw();
//Setter
slideWindow.content('This will be the content'); //returns slideWindow
//Getter
console.log(slideWindow.content()); //returns the content element
position
The position of the slide window widget.
Accepted values: right | left | top | bottom
Code examples
Initialize the slide window widget with the position option specified, using object in constructor
$A.newSlideWindow({
position: 'left'
}).draw();
Initialize the slide window widget with the position option specified, using method chaining
$A.newSlideWindow().position('left').draw();
Get or set the position option, after initialization
var slideWindow = $A.newSlideWindow().draw();
//Setter
slideWindow.position('left'); //returns slideWindow
//Getter
console.log(slideWindow.position()); //returns value of position
positionX
positionX determines the distance between the left edge of the slide window widget and the left edge of its containing element in pixels.
Usage only enabled if the widget is positioned to the top or on the bottom.
You can also use right | left | center keywords to set the horizontal position of the side window widget.
Disabled if position: 'right' || position: 'left'.
Code examples
Initialize the slide window widget with the positionX option specified, using object in constructor
$A.newSlideWindow({
position: 'bottom',
positionX: 'right'
}).draw();
Initialize the slide window widget with the positionX option specified, using method chaining
$A.newSlideWindow().position('bottom').positionX('right').draw();
Get or set the positionX option, after initialization
var slideWindow = $A.newSlideWindow({position: 'bottom'}).draw();
//Setter
slideWindow.positionX('right'); //returns slideWindow
//Getter
console.log(slideWindow.positionX()); //returns value of positionX
positionY
positionY determines the distance between the top edge of the slide window widget and the top edge of its containing element in pixels.
Usage only enabled if the widget is positioned to the right or the left.
You can also use top | bottom | middle keywords to set the vertical position of the side window widget.
Disabled if position: 'top' || position: 'bottom'.
Code examples
Initialize the slide window widget with the positionY option specified, using object in constructor
$A.newSlideWindow({
position: 'right',
positionY: 'middle'
}).draw();
Initialize the slide window widget with the positionY option specified, using method chaining
$A.newSlideWindow().position('right').positionY('middle').draw();
Get or set the positionY option, after initialization
var slideWindow = $A.newSlideWindow({position: 'right'}).draw();
//Setter
slideWindow.positionY('middle'); //returns slideWindow
//Getter
console.log(slideWindow.positionY()); //returns value of positionY
tab
Default value:
{text: 'Click this!', html: $('<span></span>'), width: 'auto', pos: 'right'}
The clickable tab of the slide window widget. The widget opens on one click on the tab, and closes on another click on it.
-
text
Type: String
The text shown on the tab.
-
html
Type: jQuery
You can insert a jQuery element in the tab by using this attribute.
-
width
Type: String
The width of the tab in pixels.
You can also use optional values:
'100%': the tab width will be adjusted to the slide window widget.
'auto': the tab width will be adjusted to the text inside it.
-
pos
Type: String
The text position of the tab.
Optional values:
top | bottom | middle if the slide window widget is positioned to the left or the right.
left | center | right if the slide window widget is positioned to the top or the bottom.
Code examples
Initialize the slide window widget with the tab option specified, using object in constructor
$A.newSlideWindow({
positionY: 'top',
content: $('<div style="height:100px;">some content<div>'),
tab: {
text: 'OPEN',
pos: 'bottom'
}
}).draw();
Initialize the slide window widget with the tab option specified, using method chaining
$A.newSlideWindow({position: 'top', content:$('<div style="height:100px;">some content<div>')}).tab({text:'OPEN', pos: 'bottom'}).draw();
Get or set the tab option, after initialization
var slideWindow = $A.newSlideWindow({position: 'top', content:$('<div style="height:100px;">some content<div>')}).draw();
//Setter
slideWindow.tab({text:'OPEN', pos: 'bottom'}); //returns slideWindow
//Getter
console.log(slideWindow.tab()); //returns the tab element
title
Default value:
MySlideWindow
The displayed title in the slide window widget.
Code examples
Initialize the slide window widget with the title option specified, using object in constructor
$A.newSlideWindow({
title: 'MySlideWindow'
}).draw();
Initialize the slide window widget with the id option specified, using method chaining
$A.newSlideWindow().title('MySlideWindow').draw();
Get or set the title option, after initialization
var slideWindow = $A.newSlideWindow().draw();
//Setter
slideWindow.title('MySlideWindow'); //returns slideWindow
//Getter
console.log(slideWindow.title()); //returns value of title
width
The width of the slide window widget without the slide window in pixels.
Code examples
Initialize the slide window widget with the width option specified, using object in constructor
$A.newSlideWindow({
width: 600
}).draw();
Initialize the slide window widget with the width option specified, using method chaining
$A.newSlideWindow().width(600).draw();
Get or set the width option, after initialization
var slideWindow = $A.newSlideWindow().draw();
//Setter
slideWindow.width(600); //returns slideWindow
//Getter
console.log(slideWindow.width()); //returns value of width
zIndex
The zIndex property specifies the stack order of an element.
An element with greater stack order is always in front of an element with a lower stack order.
Code examples
Initialize the slide window widget with the zIndex option specified, using object in constructor
$A.newSlideWindow({
zIndex: 3000
}).draw();
Initialize the slide window widget with the zIndex option specified, using method chaining
$A.newSlideWindow().zIndex(3000).draw();
Get or set the zIndex option, after initialization
var slideWindow = $A.newSlideWindow().draw();
//Setter
slideWindow.zIndex(3000); //returns slideWindow
//Getter
console.log(slideWindow.zIndex()); //returns value of zIndex