html可操作向导,jQuery和css3网站操作提示向导插件

这款jQuery和css3网站操作提示向导插件界面十分简洁,提示框可以关闭,关闭后变为一个按钮。每个步骤可以通过“next”按钮来查看。

HTML

Guided tour tooltip

Guided tour tooltip inspired by Jonathan Moreira

Dribbble shot visible at

this link

Codepen by Yoann Helin

Twitter : @YoannHELIN

Book : Yoannhelin.fr

Thank you !

Next

Open

JAVASCRIPT

$(document).ready(function () {

var nbP = $('.container p').length;

var w = parseInt($('.container p').css("width"));

var max = (nbP - 1) * w;

$("ul li[data-num='1']").addClass('active');

$('.step span').html('Step 1');

$('body').on('click','.btn', function(){

var margL = parseInt($('.slider-turn').css('margin-left'));

var modulo = margL%w;

if (-margL < max && modulo == 0) {

margL -= w;

$('.slider-turn').animate({

'margin-left':margL

},300);

$('ul li.active').addClass('true').removeClass('active');

var x = -margL/w +1;

$('ul li[data-num="'+x+'"]').addClass('active');

$('.step span').html("Step "+x);

}

else {}

});

$('body').on('click','.close',function(){

$('.container').animate({

'opacity':0

},600);

$('.container').animate({

'top':-1200

}, {

duration: 2300,

queue: false

});

$('.open').animate({

'top':'50%'

});

});

$('body').on('click','.open',function() {

$('.open').animate({

'top':-1000

});

$('.container').animate({

'opacity':1

},400);

$('.container').animate({

'top':'50%'

}, {

duration: 800,

queue: false

});

});

});

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值