jQuery Accordion: links don't work

后端 未结 9 566
终归单人心
终归单人心 2020-12-06 08:44

I\'m working on a page using jQuery\'s accordion UI element. I modeled my HTML on that example, except that inside the

  • elements, I have some unordere
  • 9条回答
    •  再見小時候
      2020-12-06 08:51

      Try adding an inline onlick that prevents event bubbling:

      ...
      A Group of Links
      ...
      

      Or a domready event like so:

      $(".toggle-title a").click(function(event){ event.stopPropagation()})
      

      However the latter didn't work for me even though code wise it makes sense, jQuery executes the click! Anyone that can explain that to me feel free, I come from MooTools and Google Closure background which has addEvent functions.

    提交回复
    热议问题