jquery - 在 JQuery 中具有多组图像的 FadeIn 和 FadeOut 效果
问题描述
我想在我的网页中淡入/淡出一些图像,就像
http://jsfiddle.net/hKMFb/450/
但是有一些条件是:
1. 当我点击任何一个图像时,新的一组图像应该用淡入淡出效果替换所有图像(类似于“不是机器人”验证码)
2. 我想知道在我的后端点击了哪个图像
我该怎么做?
$(document).ready(function() {
var activeId = $(".active").each(function(){
$("#content" + $(this).attr("id").replace("tab","")).show(1000);
});
$(".tabs a").click(function() {
var $tabs =$(this).closest(".tabs");
$("#content" +$tabs.attr("data-lastContent")).hide(1000);
$(this).closest(".tabs").find(".active").removeClass("active");
$(this).addClass("active");
var id = $(this).closest("li").attr("id").replace("tab","");
$tabs.attr("data-lastContent", id);
$("#content" + id).show(1000);
});
});
解决方案
推荐阅读
- java - 当该名称在列表中多次出现时,告诉删除数组列表中的名称的程序
- html - 使用css在网格上等间距按钮
- python - 如何从命令行在我的 bashrc 文件中设置路径变量以使用 python 3
- janusgraph - JanusGraph.open() 如何工作以及如何扩展?
- python - 3个字符的python正则表达式逗号分隔值csv
- java - 使用 SimpleDateFormat.parse("yyyy-MM-dd") 时出现 ParseException
- android - 如何查找android应用程序是由AndroidOS还是ChromeOS的android容器启动的?
- php - 删除双字符编码
- javascript - 图像不显示
- Reactjs中数组对象的map函数中的标记
- mysql - 为什么所有 Sequelize 示例模型都用 Model(sequelize, Sequelize) 实例化?