开发者

Problems inserting auto scrolling thumbnails into accordion menu

开发者 https://www.devze.com 2023-02-24 00:08 出处:网络
I have an auto-scrolling thumbnail DIV that I want to insert into an accordion menu. Here is the auto-scrolling thumbnail script (duplicated).

I have an auto-scrolling thumbnail DIV that I want to insert into an accordion menu.

  • Here is the auto-scrolling thumbnail script (duplicated).
  • Here is the accordion menu.
  • Here is my failed attempt to combine them

I removed position: absolute; from the CSS to allow the two thumbnail DIV's to be on the same page without them conflicting, which may be part of the problem. Someone suggested I put wrapAll('<div>') into my JQ but I don't know how.

Does anyone have any suggestions? Sorry, I know trying to prevent two plugins from conflicting can be irritating, but any help would be greatly appreciated.开发者_开发知识库


Hmmm. solved my own problem. The answer was staring me in the face: The accordion menu has a section at the very end of the JavaScript that allows you to insert code that gets initialised when a header is opened or closed:

onopenclose:function(header, index, state, isuseractivated){ 
//custom code to run whenever a header is opened or closed
    }

So I just put the auto scrolling thumbnail script in there. Unfortunately it builds the thumbnails from scratch every time you open a header, but at least it works now :)

0

精彩评论

暂无评论...
验证码 换一张
取 消