我如何使用超大型jQuery插件的这个API [英] How do i use this api of supersized jquery plugin

查看:185
本文介绍了我如何使用超大型jQuery插件的这个API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

喜是使用超大型插件。我想改变这取决于装有何种滑动页面的内容。在本文档中我找到了该API,但无法弄清楚如何做到这一点。

Hi am using supersized plugin. I want to change the content in the page depending on what slide is loaded. In the documentation i found the api for that, but couldn't figure out how to do it.

下面是本文档的复制粘贴

Below is a copy-paste from the documentation

theme.afterAnimation()

每个幻灯片过渡完成时间运行。

Runs each time a slide transition is completed.

触发:每张幻灯片过渡期后

http://buildinternet.com/project/supersized/docs.html#主题后

如果我想提示警报('滑变了!'); 每张幻灯片更改后怎么会是谁?
我只是无法理解如何这些API'可以使用。

If i want to prompt alert('slide changed!'); after each slide change how would it be? I just cant understand how these apis' could be used.

推荐答案

我是超大尺寸的创作者,我想这里流行,并帮助你理顺了这一点。

I'm the creator of Supersized and I wanted to pop in here and help you straighten this out.

在实际的下载,这里位置,你会发现,幻灯片文件夹中有一个主题文件夹,从js和css文件夹分开 - 这就是我们要聚焦的区域

In the actual download, located here, you'll notice that within the slideshow folder there is a theme folder, separate from the js and css folders - this is the area we'll focus on.

在两部分超大型运行:


  1. 基本文件 (JS / supersized.3.2.x&安培; CSS / supersized.css)包含的基本功能,如转换的,下一首/ $ p $光伏幻灯片,和所有其他的必须成分

  1. The base files (js/supersized.3.2.x & css/supersized.css) which contain the base functionality such as transitions, next/prev slide, and all the other essential components.

主题文件 (位于主题文件夹中)的允许你修改与自定义幻灯片,就像你提到的,或者之类的东西进度酒吧和每张幻灯片的自定义内容。这些是从每一次失败中的自定义有一个更新基本文件,这是在previous版本的情况下分开,以prevent你。

The theme files (located in the theme folder) which allow you to modify the slideshow with customizations, like the one you mentioned, or things like progress bars and custom content for each slide. These are separated to prevent you from losing the customizations every time there is an update to the base files, which was the case in previous versions.

在下载,我已经包括快门主题,我打算让人们为自己的发展奠定了基础使用。 不要担心触及基本文件 - 他们自动调用主题文件,这就是您的所有更改会

In the download, I have included the Shutter theme, which I intended for people to use as a foundation for their own development. Don't worry about touching the base files - they automatically call the theme files, which is where all of your changes will go.

如果你打开​​的主题/ supersized.shutter.js 的,你会发现有是主题对象文本中的功能数量 - 这是你将在主题功能下降的地方文档中的说明。 请记住,你将需要更新演示html页面的路径指向这个文件,一旦你编辑它,因为默认情况下它指向精缩的主题/ supersized.shutter.min.js

If you open up theme/supersized.shutter.js, you'll notice there are are number of functions within the theme object literal - this is the place where you would drop in the theme functions described in the documentation. Keep in mind that you will need to update the path on the demo html page to point to this file once you edit it, since by default it points to the minified theme/supersized.shutter.min.js.

如果您对底部滚动的 supersized.shutter.js 的,你会发现你正在寻找的afterAnimation功能 - 这是在那里你可以插上警报('滑动改变');

If you scroll towards the bottom of supersized.shutter.js, you'll notice the afterAnimation function you're looking for - this is where you can plug in the alert('Slide Changed'); line.

从那里,你可以自由地剔除任何功能,你不需要,打造出属于自己的主题。

From there you're free to strip out whatever functions you don't need and build out your very own theme.

希望帮助和一个大感谢您使用的插件!

Hope that helps and a big thank you for using the plugin!

最佳,
山姆邓恩

Best, Sam Dunn

这篇关于我如何使用超大型jQuery插件的这个API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆