您好,我需要使用“查看 360”按钮来模仿此网站功能:http: //www.designrattan.co.uk/daybed/apple
我已经完成了 360 脚本,只是我无法解决的按钮?
我在这里尝试过:http: //designliving.tk/winchester-rattan-garden-round-table-set
但如您所见,有几件事是错误的。
单击按钮时我需要更改 DIV,但每次单击时我也需要更改按钮(从“查看 360”到“查看图像”)。
除此之外,我需要照片选项卡中的图像才能将 div 和按钮更改回“查看 360”
我想我有 JavaScript,但我不知道如何将它与 HTML 结合使用
$('.yourButton').bind('click',function(){
if (!$('.yourButton').hasClass('dragMode')) {
$('.yourButton').addClass('dragMode');
$('.yourButton').attr('value')="Drag [...]";
} else { // if in drag mode
$('.yourButton').removeClass('dragMode');
$('.yourButton').attr('value')="View 360";
}
});
$('.yourTabImages').bind('click',function(){
if ($('.yourButton').hasClass('dragMode')) {
$('.yourButton').removeClass('dragMode');
$('.yourButton').attr('value')="View 360";
}
});
我希望这一切都有意义!
感谢大家!