jQuery技术:jQuery手风琴 – 链接打开某些div

我正在做一个噩梦试图让这个工作(并查看其他post,但我仍然有问题)。

基本上我有这样的链接:

/test.php#bob 

在test.php我有这个:

 

Customer care

xxxxxxxxxxxxx

Strong leadership from start to finish

fffffffffff

Certainty of delivery, no matter how complex or difficult

dddddddddd

在jQuery我有这个:

 $(".accordion").accordion({ autoHeight: false, collapsible: true, navigation: true, active: 'none' }); 

但我仍然无法通过链接打开#bob面板。

有任何想法吗? 我把头发拉了出来。

一个。

    你可以这样做:

     $(".accordion").accordion({ autoHeight: false, collapsible: true, navigation: true, active: 'none' }); if(location.hash) $(location.hash).click(); 

    这将执行click

    (通过使用散列,其中包括#作为#id选择器 ),调用标准的手风琴行为。

      以上就是jQuery教程分享jQuery手风琴 – 链接打开某些div相关内容,想了解更多jQuery开发(异常处理)及jQuery教程关注计算机技术网(www.ctvol.com)!)。

      本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

      ctvol管理联系方式QQ:251552304

      本文章地址:https://www.ctvol.com/jquerytutorial/547789.html

      (0)
      上一篇 2021年1月13日
      下一篇 2021年1月13日

      精彩推荐