2021-01-12 13:05
jQuery简易时光轴实现方法示例
这篇文章主要介绍了jQuery简易时光轴实现方法,可实现点击底部链接动态加载内容的功能,涉及jQuery响应鼠标事件动态操作页面元素属性的相关实现技巧,需要的朋友可以参考下
<()
.replace('{bigAction}', bigTitleData.bigAction)
.replace('{bigInfo}', bigTitleData.bigInfo)
//生成大标题下对应的内容
var bigContentData = [{
smallTime: '2010.10.11',
smallAction: '录单 ' + index,
smallInfo: '操作时间: '
smallTime: '2010.10.15',
smallAction: '审核 ' + index,
smallInfo: '操作时间: '
smallTime: '2010.10.15',
smallAction: '分发 ' + index,
smallInfo: '操作时间: '
();
var str = '';
for(var i=0; i bigContentData.length; i++){
str += bigContentTplStr.replace('{smallTime}', bigContentData[i].smallTime)
.replace('{smallAction}', bigContentData[i].smallAction)
.replace('{smallInfo}', bigContentData[i].smallInfo);
$('.(str).hide().slideDown(500);
//查看更多, 每次点击生成一个新的节点
$('.showMore').on('click', function(){
if($(this).text() === '查看更多'){
if(index === 0){
index++;
baseOrderNodeCreate();//基地生产
else if(index === 1){
index++;
stockNodeCreate();//仓库库存
else if(index === 2){
index++;
delNodeCreate();//发货
else if(index === 3){
index++;
setNodeCreate();//结算
$(this).text(' →_→ 没有记录了');
// + - 按钮 收缩效果
$(document).on('click', '.bigButtonSeeMore', function(){
var clickObj = $(this);
var bigContentObj = clickObj.parent().next().next();
if(clickObj.text() === '+'){
bigContentObj.slideDown(500, function(){
(' a href="javascript:;" rel="external nofollow" rel="external nofollow" " - /a //切换图标
else if(clickObj.text() === '-'){
bigContentObj.slideUp(500, function(){
(' a href="javascript:;" rel="external nofollow" rel="external nofollow" " + /a
/script
/body
/html
更多关于jQuery相关内容感兴趣的读者可查看本站专题:《》、《》、《》、《》、《》、《》、《》及《》
希望本文所述对大家jQuery程序设计有所帮助。