| Name | Type | Default |
|
animationDuration
# |
number
|
30
|
Sets or gets the animationDuration property. Specifies the duration of the animation which starts when the current page is changed.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView ref={myScrollView} width={600} height={450} animationDuration={3000}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
bounceEnabled
# |
boolean
|
true
|
Sets or gets whether the bounce effect is enabled when pages are changed.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView ref={myScrollView} width={600} height={450} bounceEnabled={false}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
buttonsOffset
# |
Array<number>
|
[0, 0]
|
Sets or gets the jqxScrollView's buttonsOffset property. This property sets the offset from the default location of the navigation buttons.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView ref={myScrollView} width={600} height={450} buttonsOffset={[100, 0]}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
currentPage
# |
number
|
0
|
Sets or gets the jqxScrollView's currentPage property. The currentPage specifies the displayed element.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView ref={myScrollView} width={600} height={450} currentPage={1}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
disabled
# |
boolean
|
false
|
Sets or gets the jqxScrollView's disabled property.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView ref={myScrollView} width={600} height={450} disabled={true}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
height
# |
string | number
|
320
|
Sets or gets the jqxScrollView's height.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView ref={myScrollView} width={600} height={450}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
moveThreshold
# |
number
|
0.5
|
Sets or gets the jqxScrollView's moveThreshold property. The moveThreshold property specifies how much the user should drag the current element to navigate to next/previous element. Values should be set from 0.1 to 1. 0.5 means 50% of the element's width.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView ref={myScrollView} width={600} height={450} moveThreshold={1}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
showButtons
# |
boolean
|
true
|
Sets or gets whether the navigation buttons are visible.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView ref={myScrollView} width={600} height={450} showButtons={false}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
slideShow
# |
boolean
|
false
|
Indicates whether the slideShow mode is enabled. In this mode, pages are changed automatically in a time interval.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView ref={myScrollView} width={600} height={450} slideShow={true}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
slideDuration
# |
number
|
3000
|
Sets or gets the duration in milliseconds of a time interval. The current page is changed when the time interval is elapsed.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView
ref={myScrollView}
width={600}
height={450}
slideShow={true}
slideDuration={1000}
>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
theme
# |
string
|
''
|
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView ref={myScrollView} width={600} height={450} theme={'material'}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
width
# |
string | number
|
320
|
Sets or gets the jqxScrollView's width.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
return (
<JqxScrollView ref={myScrollView} width={600} height={450}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
|
|
pageChanged
# |
Event
|
|
This event is triggered when the current page is changed.
Code examples #
Bind to the pageChanged event of jqxScrollView.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
const onPageChanged = (_e: Event): void => {
alert('do something...');
};
return (
<JqxScrollView ref={myScrollView} onPageChanged={onPageChanged} width={600} height={450}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
|
| Name | Arguments | Return Type |
|
back
# |
None
|
|
Navigates to the previous page.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
useEffect(() => {
myScrollView.current!.back();
}, []);
return (
<JqxScrollView ref={myScrollView} width={600} height={450}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
changePage
# |
index
|
|
Navigates to a page.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
useEffect(() => {
myScrollView.current!.changePage(1);
}, []);
return (
<JqxScrollView ref={myScrollView} width={600} height={450}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
forward
# |
None
|
|
Navigates to the next page.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
useEffect(() => {
myScrollView.current!.forward();
}, []);
return (
<JqxScrollView ref={myScrollView} width={600} height={450}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
refresh
# |
None
|
|
Refreshes the widget.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxScrollView from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxscrollview';
function App() {
const myScrollView = useRef<JqxScrollView>(null);
useEffect(() => {
myScrollView.current!.refresh();
}, []);
return (
<JqxScrollView ref={myScrollView} width={600} height={450}>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature1.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature2.jpg)'
}}
></div>
<div
className="photo"
style={{
backgroundImage:
'url(https://www.jqwidgets.com/jquery-widgets-demo/images/imageNature3.jpg)'
}}
></div>
</JqxScrollView>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|