I am using the jQuery UI accordion on my page. I have Javascript code on my page load:
$(function() { $("#accordion").accordion({ active: false, autoHeight: false, navigation: true, collapsible: true }); });
When the page loads, all tabs are open for several seconds and then reset. Maybe its loading effect. How to make jQuery UI Accordion crash on page load. Please suggest
Although this is not a direct answer, perhaps you can make it hidden and then show it when you create it:
$("#accordion").accordion({ active: false, autoHeight: false, navigation: true, collapsible: true, create: function(event, ui) { $("#accordion").show(); } });
Update: This fiddle works for me: http://jsfiddle.net/47aSC/6/
For me, this works:
$(function() { $( "#accordion" ).accordion({ collapsible: true, autoHeight: true, active: false }); });
, - . , display:none, css, :
display:none
$("#accordion").show().accordion({ active: false, autoHeight: false, navigation: true, collapsible: true });
( @Mrchief), , .accordion() . .
.accordion()
:
jquery.ui.accordion.js 29 31 (, 1.10.4).
29 Active: 100, 31 : true,
- script . (, 100), , 100- h3- ( ).
: true , h3 .
.
$(document).ready(function() { $('.collapse').collapse({ toggle: false }); });
.collapse DOM, DOM.
.collapse
// , , bootstrap 2.0
$(document).ready(function () { if ($("#accordianId").length>0) { $("#accordianId").trigger("click"); } });
bootstrap 3.0
$( "#accordianId" ).accordion( "option", "active", 0 );