Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 22nd, 2012  |  syntax: None  |  size: 3.33 KB  |  hits: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. jCarousel into Tabbed Menu
  2. <link type="text/css" href="http://www.immobilia-re.eu/wp-content/plugins/css/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" />
  3.         <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
  4.         <script type="text/javascript" src="http://www.immobilia-re.eu/wp-content/plugins/js/jquery-ui-1.8.10.custom.min.js"></script>
  5.  
  6. <script type="text/javascript">
  7.                 $(function(){
  8.  
  9.                     // Tabs
  10.                     $('#tabs').tabs();
  11.  
  12.                     //hover states on the static widgets
  13.                     $('#dialog_link, ul#icons li').hover(
  14.                         function() { $(this).addClass('ui-state-hover'); },
  15.                         function() { $(this).removeClass('ui-state-hover'); }
  16.                 );
  17.  
  18.             });
  19.     </script>
  20.  
  21.         <style type="text/css">
  22.             /*demo page css*/
  23.             body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;}
  24.             .demoHeaders { margin-top: 2em; }
  25.             #dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
  26.             #dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
  27.             ul#icons {margin: 0; padding: 0;}
  28.             ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left;  list-style: none;}
  29.             ul#icons span.ui-icon {float: left; margin: 0 4px;}
  30.         </style>
  31.        
  32. <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  33.     <link href="http://www.immobilia-re.eu/wp-content/plugins/jcarousel/filename.css" rel="stylesheet" type="text/css"/>
  34.     <link href="http://www.immobilia-re.eu/wp-content/plugins/jcarousel/jquery.jcarousel.css" rel="stylesheet" type="text/css"/>
  35.     <link href="http://www.immobilia-re.eu/wp-content/plugins/jcarousel/skin.css" rel="stylesheet" type="text/css"/>
  36.   <script type="text/javascript" src="http://www.immobilia-re.eu/wp-content/plugins/jcarousel/jquery.jcarousel.js"></script>
  37.  
  38. <script>
  39. $(function() {
  40.  
  41.     $('#first-carousel').jcarousel();
  42.  
  43.   $("#tabs-navitems li a").click(function() {
  44.  
  45.         // Figure out current list via CSS class
  46.         var curList = $("#tabs-navitems li a.current").attr("rel");
  47.  
  48.         // List moving to
  49.         var $newList = $(this);
  50.  
  51.         // Set outer wrapper height to height of current inner list
  52.         var curListHeight = $("#all-list-wrap").height();
  53.         $("#all-list-wrap").height(curListHeight);
  54.  
  55.         // Remove highlighting - Add to just-clicked tab
  56.         $("#tabs-navitems li a").removeClass("current");
  57.         $newList.addClass("current");
  58.  
  59.         // Figure out ID of new list
  60.         var listID = $newList.attr("rel");
  61.  
  62.         if (listID != curList) {
  63.  
  64.             // Fade out current list
  65.             $("#"+curList).fadeOut(300, function() {
  66.  
  67.                 // Fade in new list on callback
  68.                 $("#"+listID).fadeIn();
  69.  
  70.                 // Adjust outer wrapper to fit new list snuggly
  71.                 var newHeight = $("#"+listID).height();
  72.                 $("#all-list-wrap").animate({
  73.                     height: newHeight
  74.                 });
  75.  
  76.             });
  77.  
  78.         }      
  79.  
  80.         // Don't behave like a regular link
  81.         return false;
  82.     });
  83.  
  84.  
  85. });
  86. </script>