File tree Expand file tree Collapse file tree 2 files changed +34
-13
lines changed Expand file tree Collapse file tree 2 files changed +34
-13
lines changed Original file line number Diff line number Diff line change 30
30
</script>
31
31
32
32
-->
33
- < script >
34
- $ ( function ( ) {
35
- $ ( '#myCarousel.slide' ) . carousel ( {
36
- interval : 5000 ,
37
- pause : "hover"
38
- } ) ;
39
- $ ( 'input' ) . focus ( function ( ) {
40
- $ ( "#myCarousel" ) . carousel ( 'pause' ) ;
41
- } ) . blur ( function ( ) {
42
- $ ( "#myCarousel" ) . carousel ( 'cycle' ) ;
43
- } ) ;
44
- } ) ;
45
- </ script >
46
33
47
34
< link rel ="stylesheet " href ="https://www.odata.org/public/css/bootstrap.min.css "/>
48
35
< link rel ="stylesheet " href ="{{'/public/css/site.css' | prepend: site.baseurl | prepend: site.url}} ">
Original file line number Diff line number Diff line change @@ -189,3 +189,37 @@ <h4><a href="{{'/odata-services/' | prepend: site.baseurl | prepend: site.url}}"
189
189
</ div >
190
190
</ div >
191
191
</ div>
192
+
193
+ < script >
194
+ $ ( function ( ) {
195
+ var myCarousel = $ ( "#myCarousel" ) ;
196
+
197
+ $ ( '#myCarousel.slide' ) . carousel ( {
198
+ interval : 5000 ,
199
+ pause : "hover"
200
+ } ) ;
201
+
202
+ $ ( 'input' ) . focus ( function ( ) {
203
+ myCarousel . carousel ( 'pause' ) ;
204
+ } ) . blur ( function ( ) {
205
+ myCarousel . carousel ( 'cycle' ) ;
206
+ } ) ;
207
+
208
+ var carousel = document . getElementById ( 'myCarousel' ) ;
209
+
210
+ var liveRegion = document . createElement ( 'span' ) ;
211
+ liveRegion . setAttribute ( 'aria-live' , 'polite' ) ;
212
+ liveRegion . setAttribute ( 'aria-atomic' , 'true' ) ;
213
+ liveRegion . setAttribute ( 'class' , 'live-region sr-only' ) ;
214
+ carousel . appendChild ( liveRegion ) ;
215
+
216
+ var headers = $ ( myCarousel ) . find ( 'div.carousel-inner > div > div > h1' ) ;
217
+
218
+ myCarousel . on ( 'slid.bs.carousel' , function ( ) {
219
+ var activeSlide = $ ( '#myCarousel > div.carousel-inner > div.active > div > h1' ) ;
220
+ var captionText = activeSlide . text ( ) ;
221
+ var position = headers . index ( activeSlide ) + 1
222
+ liveRegion . textContent = 'Slide ' + position + ' of ' + headers . length + ' - ' + captionText ;
223
+ } ) ;
224
+ } ) ;
225
+ </ script >
You can’t perform that action at this time.
0 commit comments