1/** 2 * Function for ResponsiveSlides used on homepage slider. 3 * 4 * jQuery effects used in theme. 5 */ 6 7//---------------------------------------------------------------------------------- 8// RESPONSIVE SLIDER - HOMEPAGE 9//---------------------------------------------------------------------------------- 10 11// Control ShuttleSlider features 12jQuery(document).ready(function() { 13 14 jQuery( '.rslides-inner .slides' ).each( function(i) { 15 16 // Set slides to transition automatically 17 slideAuto = true; 18 19 // Set transition time between slides 20 if ( ! jQuery( this ).closest( '.rslides-container' ).attr('data-speed') ) { 21 slideSpeed = 6000; 22 } else { 23 slideSpeed = jQuery( this ).closest( '.rslides-container' ).attr('data-speed') 24 25 // Disable auto-scroll if slider speed id equal to 0 26 if ( slideSpeed == 'off' ) { 27 slideSpeed = null; 28 slideAuto = false; 29 } 30 } 31 32 jQuery( this ).responsiveSlides({ 33 auto: slideAuto, // Boolean: Animate automatically, true or false 34 speed: 500, // Integer: Speed of the transition, in milliseconds 35 timeout: slideSpeed, // Integer: Time between slide transitions, in milliseconds 36 pager: true, // Boolean: Show pager, true or false 37 nav: true, // Boolean: Show navigation, true or false 38 random: false, // Boolean: Randomize the order of the slides, true or false 39 pause: true, // Boolean: Pause on hover, true or false 40 pauseControls: true, // Boolean: Pause when hovering controls, true or false 41 prevText: " ", // String: Text for the "previous" button 42 nextText: " ", // String: Text for the "next" button 43 maxwidth: "", // Integer: Max-width of the slideshow, in pixels 44 navContainer: "", // Selector: Where controls should be appended to, default is after the 'ul' 45 manualControls: "", // Selector: Declare custom pager navigation 46 namespace: "rslides", // String: Change the default namespace used 47 before: function(){}, // Function: Before callback 48 after: function(){} // Function: After callback 49 }); 50 51 }); 52}); 53 54// Homepage Responsive Slider 55jQuery(document).ready(function() { 56 57 // Supported Platforms 58 var slider = jQuery( '#slider .rslides-inner .slides' ); 59 60 slider.each(function() { 61 var el = jQuery(this); 62 el 63 .attr( 'data-aspectRatio', slider.height() / 1140 ) 64 .attr( 'data-oldWidth', el.width() ); 65 }); 66 67 jQuery(document).ready(function() { 68 slider.each( function() { 69 var el = jQuery(this), 70 newWidth = el.parents().width(), 71 oldWidth = el.attr( 'data-oldWidth' ); 72 73 el 74 .removeAttr( 'height' ) 75 .removeAttr( 'width' ) 76 .width( newWidth ) 77 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 78 }); 79 80 }).resize(); 81 82 jQuery(window) 83 .resize( function() { 84 slider.each( function() { 85 var el = jQuery(this), 86 newWidth = el.parents().width(), 87 oldWidth = el.attr( 'data-oldWidth' ); 88 89 el 90 .removeAttr( 'height' ) 91 .removeAttr( 'width' ) 92 .width( newWidth ) 93 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 94 }); 95 96 }).resize(); 97 98}); 99 100// Homepage Responsive Slider (inner li) 101jQuery(document).ready(function() { 102 103 // Supported Platforms 104 var slider_li = jQuery( '#slider .rslides-inner .slides li' ); 105 106 slider_li.each(function() { 107 var el = jQuery(this); 108 el 109 .attr( 'data-aspectRatio', slider_li.height() / 1140 ) 110 .attr( 'data-oldWidth', el.width() ); 111 }); 112 113 jQuery(document).ready(function() { 114 slider_li.each( function() { 115 var el = jQuery(this), 116 newWidth = el.parents().width(), 117 oldWidth = el.attr( 'data-oldWidth' ); 118 119 el 120 .removeAttr( 'height' ) 121 .removeAttr( 'width' ) 122 .width( newWidth ) 123 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 124 }); 125 126 }).resize(); 127 128 jQuery(window) 129 .resize( function() { 130 slider_li.each( function() { 131 var el = jQuery(this), 132 newWidth = el.parents().width(), 133 oldWidth = el.attr( 'data-oldWidth' ); 134 135 el 136 .removeAttr( 'height' ) 137 .removeAttr( 'width' ) 138 .width( newWidth ) 139 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 140 }); 141 142 }).resize(); 143 144}); 145 146 147//---------------------------------------------------------------------------------- 148// RESPONSIVE SLIDER - SHORTCODE 149//---------------------------------------------------------------------------------- 150 151// Homepage Responsive Slider 152jQuery(document).ready(function() { 153 154 jQuery( '.rslides-sc' ).each( function( i, element ) { 155 156 var instanceID = 'rslides-sc-' + i; 157 158 jQuery( element ).attr( 'id', instanceID ); 159 160
161 // Supported Platforms 162 var slider = jQuery( element ).find( '.rslides-inner .slides' ); 163 164 var width = jQuery(window).width(); 165 if( width >= 1140 || jQuery( 'body' ).hasClass( 'layout-fixed' ) ) { 166 var slider_height = jQuery( element ).data( 'height' ); 167 } else { 168 var slider_height = jQuery( element ).data( 'height' ) * (width / 1140); 169 } 170 171 jQuery( element ).find( '.rslides' ).css( { 'height': slider_height, 'max-height': slider_height } ); 172 jQuery( element ).find( '.rslides li' ).css( { 'height': slider_height, 'max-height': slider_height } ); 173 jQuery( element ).find( '.rslides img' ).css( { 'max-height': slider_height } ); 174 175 slider.each(function() { 176 var el = jQuery(this); 177 el 178 .attr( 'data-aspectRatio', slider.height() / slider.width() ) 179 .attr( 'data-oldWidth', el.width() ); 180 }); 181 182 jQuery(document).ready(function() { 183 slider.each( function() { 184 var el = jQuery(this), 185 newWidth = el.parents().width(), 186 oldWidth = el.attr( 'data-oldWidth' ); 187 188 el 189 .removeAttr( 'height' ) 190 .removeAttr( 'width' ) 191 .width( newWidth ) 192 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 193 }); 194 195 }).resize(); 196 197 jQuery(window) 198 .resize( function() { 199 slider.each( function() { 200 var el = jQuery(this), 201 newWidth = el.parents().width(), 202 oldWidth = el.attr( 'data-oldWidth' ); 203 204 el 205 .removeAttr( 'height' ) 206 .removeAttr( 'width' ) 207 .width( newWidth ) 208 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 209 }); 210 211 }).resize(); 212 }); 213}); 214 215// Homepage Responsive Slider (inner li) 216jQuery(document).ready(function() { 217 218 jQuery( '.rslides-sc' ).each( function( i, element ) { 219 220 var instanceID = 'rslides-sc-' + i; 221 222 jQuery( element ).attr( 'id', instanceID ); 223 224 // Supported Platforms 225 var slider_li = jQuery( element ).find( '.rslides-inner .slides li' ); 226 227 slider_li.each(function() { 228 var el = jQuery(this); 229 el 230 .attr( 'data-aspectRatio', slider_li.height() / slider_li.width() ) 231 .attr( 'data-oldWidth', el.width() ); 232 }); 233 234 jQuery(document).ready(function() { 235 slider_li.each( function() { 236 var el = jQuery(this), 237 newWidth = el.parents().width(), 238 oldWidth = el.attr( 'data-oldWidth' ); 239 240 el 241 .removeAttr( 'height' ) 242 .removeAttr( 'width' ) 243 .width( newWidth ) 244 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 245 }); 246 247 }).resize(); 248 249 jQuery(window) 250 .resize( function() { 251 slider_li.each( function() { 252 var el = jQuery(this), 253 newWidth = el.parents().width(), 254 oldWidth = el.attr( 'data-oldWidth' ); 255 256 el 257 .removeAttr( 'height' ) 258 .removeAttr( 'width' ) 259 .width( newWidth ) 260 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 261 }); 262 263 }).resize(); 264 }); 265}); 266 267 268 269 270//---------------------------------------------------------------------------------- 271// SHUTTLESLIDER SLIDER - SHORTCODE 272//---------------------------------------------------------------------------------- 273 274// Homepage Responsive Slider 275jQuery(document).ready(function() { 276 277 jQuery( '.shuttleslider-sc' ).each( function( i, element ) { 278 279 var instanceID = 'shuttleslider-sc-' + i; 280 281 jQuery( element ).attr( 'id', instanceID ); 282 283 284 // Supported Platforms 285 var slider = jQuery( element ).find( '.rslides-inner .slides' ); 286 287 var width = jQuery(window).width(); 288 if( width >= 1140 || jQuery( 'body' ).hasClass( 'layout-fixed' ) ) { 289 var slider_height = jQuery( element ).data( 'height' ); 290 } else { 291 var slider_height = jQuery( element ).data( 'height' ) * (width / 1140); 292 } 293 294 jQuery( element ).find( '.rslides' ).css( { 'height': slider_height, 'max-height': slider_height } ); 295 jQuery( element ).find( '.rslides li' ).css( { 'height': slider_height, 'max-height': slider_height } ); 296 jQuery( element ).find( '.rslides img' ).css( { 'max-height': slider_height } ); 297 298 slider.each(function() { 299 var el = jQuery(this); 300 el 301 .attr( 'data-aspectRatio', slider.height() / slider.width() ) 302 .attr( 'data-oldWidth', el.width() ); 303 }); 304 305 jQuery(document).ready(function() { 306 slider.each( function() { 307 var el = jQuery(this), 308 newWidth = el.parents().width(), 309 oldWidth = el.attr( 'data-oldWidth' ); 310 311 el 312 .removeAttr( 'height' ) 313 .removeAttr( 'width' ) 314 .width( newWidth ) 315 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 316 }); 317 318 }).resize(); 319 320 jQuery(window) 321 .resize( function() { 322 slider.each( function() { 323 var el = jQuery(this), 324 newWidth = el.parents().width(), 325 oldWidth = el.attr( 'data-oldWidth' ); 326 327 el 328 .removeAttr( 'height' ) 329 .removeAttr( 'width' ) 330 .width( newWidth ) 331 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 332 }); 333 334 }).resize(); 335 }); 336}); 337 338// Homepage Responsive Slider (inner li) 339jQuery(document).ready(function() { 340 341 jQuery( '.shuttleslider-sc' ).each( function( i, element ) { 342
343 var instanceID = 'shuttleslider-sc-' + i; 344 345 jQuery( element ).attr( 'id', instanceID ); 346 347 // Supported Platforms 348 var slider_li = jQuery( element ).find( '.rslides-inner .slides li' ); 349 350 slider_li.each(function() { 351 var el = jQuery(this); 352 el 353 .attr( 'data-aspectRatio', slider_li.height() / slider_li.width() ) 354 .attr( 'data-oldWidth', el.width() ); 355 }); 356 357 jQuery(document).ready(function() { 358 slider_li.each( function() { 359 var el = jQuery(this), 360 newWidth = el.parents().width(), 361 oldWidth = el.attr( 'data-oldWidth' ); 362 363 el 364 .removeAttr( 'height' ) 365 .removeAttr( 'width' ) 366 .width( newWidth ) 367 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 368 }); 369 370 }).resize(); 371 372 jQuery(window) 373 .resize( function() { 374 slider_li.each( function() { 375 var el = jQuery(this), 376 newWidth = el.parents().width(), 377 oldWidth = el.attr( 'data-oldWidth' ); 378 379 el 380 .removeAttr( 'height' ) 381 .removeAttr( 'width' ) 382 .width( newWidth ) 383 .height( newWidth * el.attr( 'data-aspectRatio' ) ); 384 }); 385 386 }).resize(); 387 }); 388});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.