Having an issue with adding a <p>
tag before each jQuery accordion on my MVC page.
No matter what I try, the jQuery styling keeps interfering with the classes and styles of my <p>
tag. Is there a way to make it look like the other non-jQuery <p>
tags without the interference?
UPDATE
Below is the code used to create the accordions:
<section id="accordions" aria-label="accordion-expand\collapse" class="col-md-12">
@{
foreach (var accordion in Model.Content.Children.Where(f => f.DocumentTypeAlias.Equals("Accordion", StringComparison.CurrentCultureIgnoreCase)))
{
var isInScheme = Model.User != null ? Model.User.IsInScheme(accordion.GetPropertyValue<String>("schemeTypes")) : false;
var isMemberStatus = Model.User != null ? Model.User.IsMemberStatusType(accordion.GetPropertyValue<String>("memberStatusTypes")) : false;
if ((!accordion.HasValue("schemeTypes") && !accordion.HasValue("memberStatusTypes")) || (isInScheme && isMemberStatus))
{
if (accordion.GetPropertyValue<String>("accordionText") != "" & accordion.GetPropertyValue<String>("accordionText") != null)
{
<p>accordion.GetPropertyValue<String>("accordionText")</p>
}
<h3 class="clearfix" id="@accordion.Id">
<span class="title">@(accordion.GetPropertyValue<String>("accordionHeader"))</span>
</h3>
<article class="clearfix">
@(Html.Raw(accordion.GetPropertyValue<String>("accordionContent")))
</article>
}
}
}
</section>
The issue is that jQuery adds unwanted classes to the accordionText
inserted in the code above.