Index: trunk/extensions/SemanticResultFormats/Gallery/resources/ext.srf.jcarousel.js |
— | — | @@ -13,24 +13,20 @@ |
14 | 14 | |
15 | 15 | // Bind individual elements containing class jcarousel as the plug-in |
16 | 16 | // requires different id's |
17 | | - $(".jcarousel").each(function() { |
18 | | - var galleryId = "#" + $(this).closest(".jcarousel").attr("id"), |
19 | | - v_vertical = ( $( this ).attr( 'vertical' ) === 'true'), // Value is either true or false |
20 | | - v_rtl = ( $( this ).attr( 'rtl' ) === 'true'); // Value is either true or false |
21 | | - //console.log(galleryId); |
| 17 | + $(".jcarousel").each(function() { |
| 18 | + var $this = $( this ); |
22 | 19 | |
23 | 20 | // Display carousel only after js is loaded and is ready otherwise display=none |
24 | | - $( this ).show(); |
| 21 | + $this.show(); |
25 | 22 | |
26 | 23 | // Call the jcarousel plug-in |
27 | | - $( this ).jcarousel({ |
28 | | - scroll: parseInt($( this ).attr( 'scroll' ) ), // Number of items to be scrolled |
29 | | - visible: parseInt($( this ).attr( 'visible' ) ), // calculated and set visible elements |
30 | | - wrap: $( this ).attr( 'wrap' ), // Options are "first", "last", "both" or "circular" |
31 | | - vertical: v_vertical, // Whether the carousel appears in horizontal or vertical orientation |
32 | | - rtl: v_rtl // Directionality |
| 24 | + $this.jcarousel( { |
| 25 | + scroll: parseInt( $this.attr( 'scroll' ), 10 ), // Number of items to be scrolled |
| 26 | + visible: parseInt( $this.attr( 'visible' ), 10 ), // calculated and set visible elements |
| 27 | + wrap: $this.attr( 'wrap' ), // Options are "first", "last", "both" or "circular" |
| 28 | + vertical: $this.attr( 'vertical' ) === 'true', // Whether the carousel appears in horizontal or vertical orientation |
| 29 | + rtl: $this.attr( 'rtl' ) === 'true' // Directionality |
33 | 30 | } ); |
34 | | - |
35 | 31 | } ); |
36 | 32 | |
37 | 33 | } ); |