Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Edited <em>anasnakawa</em> code for those <strong>who don't need jQuery UI Accordion styling</strong> and wants to keep the code simple. <em>(hope you'll find it useful)</em></p> <p>HTML:</p> <pre><code>&lt;div id="multiOpenAccordion"&gt; &lt;h3&gt;tab 1&lt;/h3&gt; &lt;div&gt;A lot of text&lt;/div&gt; &lt;h3&gt;tab 2&lt;/h3&gt; &lt;div&gt;A lot of thex 2&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Javascript:</p> <pre><code>$(function(){ $('#multiOpenAccordion').multiAccordion(); }); </code></pre> <p><strong>Changed code:</strong></p> <pre><code>(function($){ $.fn.extend({ multiAccordion: function(options) { var defaults = {}; var options = $.extend(defaults, options); return this.each(function() { var $this = $(this); var $h3 = $this.children('h3'); var $div = $this.children('div'); $h3.click(function(){ var $this = $(this); var $div = $this.next(); if ($this.hasClass('closed')) { $this.removeClass('closed').addClass('open'); $div.slideDown('fast'); } else { $this.removeClass('open').addClass('closed'); $div.slideUp('fast'); } }); }); } }); })(jQuery); </code></pre> <p><em><strong>Edit:</em></strong> If you use Malihu custom scrollbar then there may be problems with IE. IE drops error saying</p> <blockquote> <p>Invalid argument, Line xx, character xxx</p> </blockquote> <p>I removed this code from Malihu scrollbar (which is responsible about scrolling content which is more than 1000px glitch) - It helped.</p> <pre><code>$.fx.prototype.cur = function(){ if ( this.elem[this.prop] != null &amp;&amp; (!this.elem.style || this.elem.style[this.prop] == null) ) { return this.elem[ this.prop ]; } var r = parseFloat( jQuery.css( this.elem, this.prop ) ); return typeof r == 'undefined' ? 0 : r; } </code></pre> <p>This gave me real headache</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload