Hi,
I have a Quicktabs instance that shows all tabs closed by default, and I need to be able to toggle tab content by clicking their respective tabmenu links. In essence I need to close the currently open tab by clicking its tabmenu link.
This is purely a jquery request and hence the magic needs to happen in modules/quicktabs/js/quicktabs.js. My own limited skills got me pretty close, but for the life of me I cannot get it working.
Can we perhaps have a patch for this by some jquery wizard? Pretty please.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | open-close-toggle-tab-1988170-6.patch | 1.47 KB | k.minkov |
Comments
Comment #1
irowboat commentedActually, I got this working. If somebody stumbles here looking for a similar solution, please let me know and I'll try to provide a patch.
Comment #2
rubic commented>irowboat
hello irowboat!! is it possible to show how u managed with this task?
Comment #3
irowboat commentedSorry, missed your message at the time! Anyways,, here's a small snippet for js/quicktabs.js that was used to replace the original function. It's not pretty but got the job done. ;)
(This is tested with 7.x-3.4, probably works with the current version but please test and let me know if not.)
Comment #4
irowboat commentedComment #5
rubic commentedupppssss!!! missed your answer
thank you very much... :) will test it in some nearest projects
will let you know
Comment #6
k.minkov commentedI tried the obove function against 3.6 version and didn't work very well. After you open a tab and then close it you cannot open it anymore. I created a patch (against 3.6) which is a little simpler and does the job right.
Comment #7
irowboat commentedThank you for the patch! The snippet above is ancient & overall bad (as are my JS skills), so obviously anybody coming here should go with k.minkov's patch. Cheers.
Comment #8
JohnnyW commentedThank you, k.minkov! #6 worked great! I also added a "X Close" tab with node > view mode "Full Content" [hide title of this node] and that too helps (as I placed tabs above posting).
J