我正在使用http://www.menucool.com/tabbed-content制作标签。有没有办法通过jquery/javascript改变标签页?我已经试过$("tab1").click();了
为此创建了一个小提琴- https://jsfiddle.net/6e3y9663/1/
发布于 2016-09-15 17:46:31
使用选定的类进行游戏
$('.tabs').find('li.selected').removeClass('selected');//reset the tab buttons
$('#desiredTab').parent().addClass('selected');//or $('li a[href="#tab1"]').parent().addClass('selected'); - select the desired tab header
id = $('#desiredTab').attr('href');
$(id).siblings().hide();//reset the tab content
$(id).show();//$('#tab1').show(); -show the desired tab contenthttps://stackoverflow.com/questions/39507802
复制相似问题