在ms-dropdown插件中覆盖CSS

时间:2016-09-08 12:54:12

标签: javascript c# jquery css twitter-bootstrap

ms-dropdown插件引导程序只应用插件中编写的预定义css,如何覆盖它?

的JavaScript

$(document).ready(function (e) {
    try {
        alert('Enter');
        $("#<%=ddlBrand.ClientID %>").msDropDown();
    } catch (e) {
        alert(e.message);
    }
});       

下拉控件

<asp:DropDownList ID="ddlBrand" runat="server" Width="515px" TabIndex="6" OnSelectedIndexChanged="ddlBrand_SelectedIndexChanged"></asp:DropDownList>

要添加的插件

<link href="../Styles/Vehicle/dd.css" rel="stylesheet" type="text/css" />    
<script src="../Scripts/Vehicle/jquery.dd.js" type="text/javascript"></script>   

enter code here

C#代码

protected void ddlBrand_SelectedIndexChanged(object sender, EventArgs e)

{
    Bindtitle();
}

private void Bindtitle()
{
    if (ddlBrand != null)
    {
        foreach (ListItem li in ddlBrand.Items)
        {
            li.Attributes["title"] = System.Web.VirtualPathUtility.ToAbsolute("~/Images/Vehicles/BrandLogo/" + li.Text + ".png");
        }
    }
}

0 个答案:

没有答案