如何在代码中添加div标签,如手风琴示例代码?

时间:2014-01-09 10:10:23

标签: css jquery-ui html accordion

我想在我的代码中添加手风琴菜单。手风琴菜单代码在这里http://jqueryui.com/accordion/。以下是我的代码。我在手风琴菜单代码中添加了div标签,但它不起作用。很抱歉问这个基本问题我尝试了很多,但它不起作用,这就是原因。如何在代码中添加div标签,如手风琴样本代码?

<div class="product-item" data-productid="@Model.Id" style="position:relative">
   <div class="picture">
    <a href="#" class="dialogify" data-width="350" data-height="300">Quickview</a>
    <a href="@Url.RouteUrl("Product", new { SeName = Model.SeName })" title="@Model.DefaultPictureModel.Title">
        <img alt="@Model.DefaultPictureModel.AlternateText"  price="@Model.ProductPrice.Price" desc="@Model.ShortDescription"src="@Model.DefaultPictureModel.ImageUrl" title="@Model.DefaultPictureModel.Title"  but="AjaxCart.addproducttocart('@addtocartlink    ');return false;"/>
    </a>
    <div id="dialog"></div>
   </div>

   <div class="details">
    <h2 class="product-title">
        <a href="@Url.RouteUrl("Product", new { SeName = Model.SeName })">@Model.Name</a>
    </h2>
   </div>

   <div class="description" id="desc">
    @Html.Raw(Model.ShortDescription)
   </div>

    <div class="add-info">
        <div class="prices" id="pri">
        @if (!String.IsNullOrEmpty(Model.ProductPrice.OldPrice))
        {
            <span class="price old-price">@Model.ProductPrice.OldPrice</span>
        }
        <span class="price actual-price" id="price">@Model.ProductPrice.Price</span>
        </div>
       <div class="buttons" id="but">
        @if (!Model.ProductPrice.DisableBuyButton)
        {
            <input type="button" value="@(Model.ProductPrice.AvailableForPreOrder ? T("ShoppingCart.PreOrder") : T("ShoppingCart.AddToCart"))" class="button-2 product-box-add-to-cart-button" onclick="AjaxCart.addproducttocart('@addtocartlink    ');return false;" />
        }
       </div>
   </div>

  @Html.Widget("productbox_add_info")
</div>

0 个答案:

没有答案