How may I suppress the brief display of all the accordion content during loading. When the document begins loading all the content that should be within Accordion sections displays. Then shortly there after the page renders as expected.
My script for initialising the Accordion is: $(function () { $("#accordion").accordion({ heightStyle: "content" }); });
The accordion is wrapped in an Ajax.BeginForm as shown below:
Sometimes it is necessary to tweak the styles used by the ui widgets. A reference diagram of widget components and the associated class would be extremely useful in speeding up the tweaking process. Furthermore, this diagram and association would be helpful in removing layout or style errors.
When setting heightStyle, other than not specifying heightStyle at all or:
$(function () { $("#accordion").accordion(); });
Browers Chrome, FireFox, Internet Explorer, Opera and Safari produce this view:
As never had used this widget before I am uncertain whether this is expected. When expanding the following sections the accordion-content panel overflows. Which I understand is to be expected.
Browers Chrome, FireFox, Internet Explorer, Opera and Safari produce this view:
Note there is no content rendered under "This section is required." When expanding section "Add contact..." or "Company Info..." produces this display:
note that the section has changed and now includes a horizontal scroll bar. Expanding the first section displays the initial "fill" display.
Browers Chrome, FireFox, Internet Explorer and Safari produce this view:
Expanding a section produces the following display in Browers Chrome, FireFox, Internet Explorer and Safari
I am using a ThemeRoller custom theme (colours). The site.css does not, as far as I am aware directly reference any ui style. The mark up I am using is: @using (Html.BeginForm()) { @Html.AntiForgeryToken() @Html.ValidationSummary() <div id="accordion"> <h3>This section is required</h3> <div> @Html.LabelFor(expression: m => m.UserName) @Html.TextBoxFor(m => m.UserName) @Html.ValidationMessageFor(m => m.UserName) @Html.LabelFor(m => m.Email) @Html.TextBoxFor(m => m.Email) @Html.ValidationMessageFor(m => m.Email) @Html.LabelFor(m => m.Password) @Html.PasswordFor(m => m.Password) @Html.ValidationMessageFor(m => m.Password) @Html.LabelFor(m => m.ConfirmPassword) @Html.PasswordFor(m => m.ConfirmPassword) @Html.ValidationMessageFor(m => m.ConfirmPassword) </div> <h3>Add contact information now?</h3> <div> @Html.Partial(partialViewName: "_Contact") </div> <h3>Company Information</h3> <div> @Html.Partial(partialViewName: "_Company") </div> </div> <p style="clear: both"> <input type="submit" value="Register" /> </p> }
I have referenced ui 1.10.3 jquery 2.0.3
I am using MVC 4 View Razor View Engine
These captures also demonstrate the lack of icons as I reported in a previous post.
Accordion does not display icons, irrespective of browser.
I have tried using: icons: true icons: { "header": "ui-icon-plus", "activeHeader": "ui-icon-minus" } and other forms of this parameter.
Using Firebug to inspect the active-inactive styles I can see the icon master png so I am fairly certain the image file is loading. I have linked the style and the chosen theme appears to look correct, at least the colours are correct.
I have a reference to the two script files jquery-2.0.3.js and jquery-ui-1.10.3.js so the accordion behaves as expected that is: collapse-retracts when clicked.
I have also tried removing the form element and associated AntiForgeryToken and ValidationSummary with no change in the accordion appearance. I also have tried adding <p></p> elements to wrap the HtmlHelpers with no effect.
Any ideas would be helpful. This could relate to a problem I am having with height issues in the next post.