Advertisement
thorbj

script.js

Feb 1st, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function(){
  2.    
  3.     // Paste your Flickr API key here (see the tutorial on how to generate one)
  4.     var apiKey = 'herskalAPIeninn';
  5.    
  6.     // Creating a flickr slider. This is
  7.     // how you would probably use the plugin.
  8.    
  9.     $('#flickrSlider').jqFlick({
  10.         photosetID: '72157632597356421',
  11.         width:640,
  12.         height:400,
  13.         captions:false,
  14.         autoAdvance:true,
  15.         apiKey:apiKey
  16.     });
  17.  
  18.     // Creating different flickr sliders,
  19.     // depending on the select element value.
  20.  
  21.     $('select').change(function(){
  22.        
  23.         var options = {};
  24.        
  25.         switch(this.value){
  26.             case '1':
  27.                 options = {
  28.                     photosetID: '72157632597356421',
  29.                     width:640,
  30.                     height:400,
  31.                     captions:true,
  32.                     autoAdvance:true,
  33.                     apiKey:apiKey
  34.                 };
  35.                 break;
  36.             case '2':
  37.                 options = {
  38.                     photosetID:'72157632597356421',
  39.                     width:500,
  40.                     height:500,
  41.                     captions:true,
  42.                     autoAdvance:true,
  43.                     apiKey:apiKey
  44.                 };
  45.                 break;
  46.             case '3':
  47.                 options = {
  48.                     photosetID:'72157632597356421',
  49.                     width:200,
  50.                     height:150,
  51.                     apiKey:apiKey
  52.                 }
  53.         }
  54.  
  55.         $('#flickrSlider').jqFlick(options);
  56.     });
  57.    
  58. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement