liteAccordion v2

liteaccordion

I’ve been promising to release liteAccordion v2 for ages, but I’ve been snowed under with client work as of late. Last night I finally found the time to complete the last few bits and pieces that I wanted to finish before release.

Plugin Home Page: http://nicolahibbert.com/demo/liteAccordion/
Demo Suite:
 http://nicolahibbert.com/demo/liteAccordion/demo-suite.html
Download: 
https://github.com/nikki/liteAccordion
Last edited: 21/01/13


Version 2.2 (21/01/13)

Responsive layout and auto scale images options removed
After some consideration, I’ve decided to remove the responsive options. In it’s current format, the accordion works well on mobile devices, but the mechanics of the interface are not suited to responsive designs (for example, the headers are too small to activate on mobile devices).

Development status: on indefinite hiatus
After this update, I do not plan to continue developing this plugin. Regrettably, I can no longer respond to support emails – please be sure to read the comments if you have any issues, as 99% of them will have been discussed there.


New in liteAccordion v2

Methods:
liteAccordion now has play, stop, trigger next slide, trigger previous slide, destroy and debug methods.

Mouseover activation
Slides can now be activated onmouseover.

Custom easing
The plugin now supports custom easing functions (easeOutBounce is one of my favourites :) ) using George McGinley Smith’s jQuery Easing plugin.  If you’re not planning on making use of this (i.e. if you’re using the linear or swing easing types), you don’t need to include jquery.easing.1.3.js in your page.

Linkable slides
You can now link to individual slides by assigning a name to a slide in your html, and setting the ‘linkable’ option to true.

Two new themes
v2 features two new themes: the ‘light’ theme, and the ‘stitch’ theme.  The light theme is very similar to the ‘dark’ theme, but with inverted colours.  The stitch theme is based on Orman Clark’s awesome work (again :p) over on Premium Pixels.  An interesting piece of trivia – I’d never heard of SlideDeck until ~2 months after I built version one.  If I’d known about it I might not have bothered ;)

Demo suite available
It can be a bit time consuming to fiddle with the settings of jQuery plugins to get the effect you want.  Edit JS, reload page, rinse, repeat, yawn.  I wanted to alleviate some of the tedium for myself during development, so I created a tool to let me try out different combinations of settings without reloading the page.  Try it out for yourself here!

I’m certain there are some bugs lurking around, so if you find one I’d really appreciate it if you could log it on Github for me. If you need some help with something, or have a feature request, please leave a comment on this post.  Thanks!

Related posts:

  1. Horizontal Accordion jQuery plugin
  2. Accordion Pro
  3. Portfolio Redesign

246 Comments

Got something to say? I'd love to hear from you!
Leave a Comment

  1. George says:

    I can’t seem to update successfully. Is there a manual for updating?

  2. radhakrishna says:

    The slider seems to be not working in my iphone 4gs with ios 4 in it . can you please tell me how to make it work in it its working in android devices?

  3. Ian Houghton says:

    Hi Nikki,

    I’ve implemented your fantastic accordion into my site but cannot for the life of me get the height correct. I’ve tried setting the containerHeight and maxcontainerHeight with responsive turned on and am always getting a small accordion. If I turn off responsive and set the height, this works, but I then loose the ability to scale across the width. Is there anyway to have a responsive width, but either set the height to a value or auto ?

    Thanks Ian

    • nikki says: (Author)

      I’m re-working that section atm. In the meantime the best thing to do would be to set a fixed height. Sorry about that, I hope to get that fixed shortly.

  4. Chris H says:

    Hey Nicola, thanks for this great accordion!
    Any tips on integrating touch slide events to also make it work by swiping the headers on mobile devices?

    • nikki says: (Author)

      Find the part of the plugin that binds events and bind touch to the same events that onclick triggers :)

      • Chris H says:

        Yes, but then to let the user actually “slide” the slider by swiping it on the screen is where it gets complicated, since the animation would then have to be synced with the position of the finger ;)

  5. Ali says:

    Very nice acordion example. Thanks.

  6. Vera says:

    Hi,

    I am very new to web development and plugins. I am imbarrased to ask my question… but… how do I download this plug in? I seem to not see any link implying “click here to downlaod” or similar… Once again I am very new… Please help!

  7. Yegor says:

    Thanx. Good job.
    In a future add option to change text direction in header.
    To do this I had to change core css to undo rotating and lib to correct header size.

  8. tina says:

    Hi,

    It looks like commit for issue#60 to fix bug when linkable option is set to true, broke the ability for you to click on the slide that’s already activated, and cause the activated slide to close itself (sliding to the right) to open the previous slide. I added back core.animSlide.call(tab) and it works again but obviously it breaks the linkable fix. I’m not sure what the solution should be.

  9. tina says:

    Hi,

    I’ve have the default implementation. When I click on the activated slide, it is not sliding back to show the previous slide. Any ideas?

  10. Becra says:

    Hi Nikki !

    I’ve a little question, can I add a scroll bar when my content is too large ? I’d like to do an horizontal scrollbar. Thanks for your answer !

  11. George says:

    Hi Nikki, great work with this accordion.
    I have a question, i’m trying to use the same basic accordion twice in the same page, but the second does not work, just shows the image… It is a way to use it in that way??
    Thank U :D

    • nikki says: (Author)

      Have you created two sets of markup and created two separate instances of the plugin? Take a look at the docs page, everything you need is on there.

  12. André says:

    Hi Nikki,

    your work is awesome and i really like it. I have a question it is possible to display the items vertically instead of horizontally?

  13. Fabian says:

    Hey, quick question, how can I trigger the next slide function? Im having trouble with that.

    Great plugin by the way!

    Thanx

    • nikki says: (Author)

      Use the methods – instructions are halfway down http://nicolahibbert.com/demo/liteAccordion/

      • Fabian says:

        Thanx, works like a charm! I´m trying to achieve something a little bit more complex now, I´m using the dark theme, but I want to make the distance between the slide titles shorter, but I can´t find the way to do it. Im also using a headerWitdh of 30, if I use the default headerWidth I can get it right.

        Thanx!

        • Fabian says:

          Never mind that last comment, I got around it.
          I do need to know, in a kind of an urgent manner, when will you have an IE fix for the plugin.
          If there´s anything I can help you with in order to get it to work faster, just let me know.

          Thanks in advanced

  14. jimmy says:

    Thank you for your page

  15. Sonja says:

    Hi Nikki,
    I love using this accordian script and thanks for the recent v2 update. It works brilliantly on all current browsers but was recently brought to my attention that it doesn’t work in IE10. Hopefully it’s not a major issue, but is this something you are aware of? If so, do you have any idea when an update may be available?
    Thanking you in advance :)

  16. RED Peruzkya says:

    Me again.
    succeed in changing the background color!!!

    :D

  17. RED Peruzkya says:

    Hola there!

    Its awesome.

    But how can I change the bkg colour?

    :)

  18. Hugo Rodríguez says:

    Awesome, can I use it for mi website????

  19. kami says:

    its amazing nikki thanks alot i am going to use it on my website and i m sure it will look great thanks alot

  20. Samer says:

    Hi,, Great work.. just a tiny question,, if you have the accordion set to activateOn : ‘mouseover’, and you have a caption for the first slide and you hover over the same slide header, the caption disappears.. can I overide this ??
    Thanks..

  21. rani says:

    hi,
    I was working in accordion control for last one week , but the slides are not working
    in IE8. it is working in IE9 and IE7, so please would you suggest me the answer.
    i have follow the link
    http://nicolahibbert.com/demo/liteAccordion/demo-suite.html#one

    thanks

  22. Razvan says:

    is posible to have full screen accordion?

  23. Hey Nicola —
    A really nice, light, elegant piece of code. Thanks very much for making it available. I thought I’d let folks know, in case they are coming from the Drupal world, that this AccordionLite works beautifully with Drupal 7, *assuming 2 things*:
    1. You use jquery_update to get your jQuery version up to 1.5
    2. You change the .on() calls in the bindEvents method to .bind().

    This allows you to stick with the retrograde version of jQuery that D7/jq_update provides, so you can have all the jq functionality you’ll need elsewhere (expanding fieldsets, Views admin screens, etc.) AND this awesome plugin.

    Nicola, do you think this will cause any issues elsewhere in LiteAccordion?

    Thanks again,
    Ben

    • nikki says: (Author)

      Hey Ben, thanks for stopping by :)

      I can’t see it causing any issues, but if it does, let me know and I’ll do my best to help.

      Thanks!
      Nikki.

    • Jon says:

      Ben,

      I’m struggling to get drupal to work with the lightAccordion. Can I ask what you used to call the accordion i.e did you have to wrap the $(‘#mydiv’).liteAccordion(); in any special wrapper.

      Note: I have updated jquery to 1.5.2 and changed the header.on calls to header.bind.

      thanks

      Jon

  24. sreenivas says:

    Hi i updated latest version its working fine in windows 7 chrome browsers, but windows xp same chrome version (vertical lines issue), still issue is there. please suggest me

  25. Ayelet says:

    Hi
    is there a RTL version for the liteAccordion plugin?
    thanks

  26. George says:

    Exellent…i find the proplem with the link in each image
    …a Nikki you are a gread developer…Bravo….
    I put it in my joomla “- )

  27. George says:

    Great work, Bravo…
    I ave the same question…
    Can in link the pictures inside each slide to an URL (generally to a product category). Many Thanks
    George

  28. Margaret says:

    Hey there Nicole! I absolutely love your Accordion, but for the life of me i cant figure out how to get it to work! I’ve tried following the implementation steps on the github page, but its still not working. Its shows up but only as an “ordered list” not slides. Ive uploaded the .js files to my webspace and entered the urls in the source fields…but no luck! :( I’m not the greastest with html, but i really want to get it installed! Is there somewhere that gives specifics about exactly how the full, finished code should look and where it needs to be inserted in the website template, or could someone help me…lol. Sorry, this is just frustrating. Please take a look if you get a chance: http://lovelylit.blogspot.com/

  29. Suen says:

    Hi, Nikki,

    I am wondering is there any way to remove the shadow around the border?
    I am using the “light” theme.

    Thanks.

  30. Manny says:

    Hi Nikki dig the plugin works great.

    I was wondering please could suggest how would I go about having all the accordion tabs closed on page load, so that that all accordion tabs are aligned to the right hand side of page leaving a nice blank area on the left hand side for me to use for content.

    for example:

    firstSlide : 1 //opens slide one on page load
    firstSlide : 0 //closes all slides… they do line up on the right-hand side but it throws visual errors where the slides overlap each other

    see http://themwebs.me/images/slideAccordion-tabs.gif

    any help would be greatly appreciated.

    Manny

  31. Mikkel says:

    Hi Nikki,

    I am looking to disable the “prev”-function that is triggered by clicking on the activated slide.. I can’t seem to find it.. any help?

  32. Codus says:

    Is there a way to have all panes expanded?

  33. kaval says:

    I am trying to change the container height and seem unable to do so.

    I have tried:
    (function($) {
    $(‘#responsive’).liteAccordion({ firstSlide : 5, responsive : true, autoScaleImages : true, activateOn: ‘mouseover’, containerHeight: 800, maxcontainerHeight: 800 });
    })(jQuery);

    But I still get a small container height when I try to display a page as an image. Am I missing something basic?
    Thanks,

  34. wanfr says:

    Hello
    Thank’s for liteAccordion
    can we have the height of menu fixed with the reponsive true ?

    Thanks

  35. Mike says:

    Hi,

    I spent the day yesterday trying the figure out how to move the “active” h2 from the left of the active div to the right but my js skills are very minimal. I asked the author if it was possible and she said it was if you knew js so I’m wondering if anyone knows how this would be done or has done it before?

    Thanks.

  36. kg69design says:

    Mouse hover and click does not work in IE8 even on demo page.

  37. MURILO says:

    Hi nikki,
    i am brasilian, sorry my english is very bad.
    I’m using your plugin but appears lines in google chrome when the animation occurs.
    the which may be?

  38. Mikkel says:

    Great work! I really wanna you this in my current project.. I have one problem though:

    I get graphical errors (a series of vertical black stripes across the content field, left by the slider) when the sliders are sliding from left to right. There also seem to be a small margin between all slides possitioned to the left. This only happens in Chrome (have tried Chrome, IE, Opera and Firefox)..

    Anyone else have this problem? – And does anyone have a fix for it?

  39. Yahir30 says:

    Nice Accordion :D Thanks Ms. Nikki..

  40. DeeSix says:

    Hi, nice job..interested to have this slide for my assignment….but..unfortunately I did the copy paste as instructed…but my slides not moving…:(..majorrr help pleasee~

    Thankss…

  41. NIKO says:

    Please ignore the question on my last comment. It is working fine. Thanks so much :)

  42. NIKO says:

    thanks for the plugin, I’m using it now for my project. The contents of a div gets cut to the left though when i make the custom width, is there any setting for it to show the full contents of the div without it cutting it.

    more power!

  43. Anupama says:

    Hello,
    Is it possible to achieve nesting with this plugin?

    Thank You
    Anupama

    • nikki says: (Author)

      I’ve never tried to be honest! I don’t think so though, there would be a couple of things that would conflict. Sorry!

  44. Yorch says:

    Hi Nikki, amazing accordion. I have a question: It´s possible add an open/close function on the slides? i´ve been looking and not found it on the js.
    Thank U

  45. Bogvar says:

    Hallo,
    Great work, congratulations. I have one quick question: Can in link the pictures inside each slide to an URL (generally to a product category). Many Thanks
    Bogvar

  46. dannysailes says:

    Nevermind my previous comment! All is working now :)

  47. dannysailes says:

    Apologies for posting my problem up on your bug page! I have tried using a document.ready function with your slider and it still doesn’t work – i believed it wouldnt after trying another slider as well.. so i’m rather confused as to why it/they dont work now
    Could you offer any help as to why the whole script isn’t working??

  48. john says:

    typo in the above post. It should say (line 82 in the CSS)

  49. john says:

    i found the offending CSS. The line below (8 i think)

    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=’#353535′, endColorstr=’#555555′,GradientType=1 );

    It didnt matter what i set the color attribute to, this line would always override any color. Took it out and the color is now white but obviously there is no gradient in IE8. Not sure what the IE alternative is. Thanks. Great accordion.

  50. john says:

    great accordion. I’ve been playing with it for a few days now & noticed that in IE 8 the dark theme shows the selected accordion text as black/grey but in other browsers FF, Chrome & Safari the text is white. Happens on your demo site too. I’m guessing this should be white. Cant debug the styles in IE so not sure where its coming from

    • nikki says: (Author)

      I think those are just the demo page styles. Easily changeable in your own css at any rate. IE8+ has developer tools, the shortcut is F12 I think?

Leave a Comment

If you have any thoughts
or feedback, please
leave a comment.