Click here to Skip to main content
15,890,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a master page which have java script for style a div class:
XML
<script type="text/javascript">
    $(document).ready(function () {

        var options = {
            styleClass: "selectDark",
            jScrollPane: 1
        }

        $(".mySelect").styleSelect(options);

    });
</script>



in next step i also have a page:
which have drop down:
XML
<asp:DropDownList ID="DropDownList2"  CssClass="mySelect" runat="server">
        <asp:ListItem>1</asp:ListItem>
        <asp:ListItem>2</asp:ListItem>
    </asp:DropDownList>


but this "mySelect" class not work with this,

1. it work well if i not use master page, and only have a simple page:
2. it work with master page if i use html drop down like this:
XML
<select id="Select1" class="mySelect">
       <option>1</option>

         <option>2</option>
   </select>



so what can i do, i also put this java script in content page, or master page but it not work when master page is use and asp.net control is used,
some one says that control id is changed with master page,
but here is a div class, and how this div class id changed.
plz help me
Posted
Comments
Have you tried assigning the css class to that DropDown by the id in jQuery ?
Arun kumar Gauttam 11-Dec-12 3:26am    
i not use id, because i want use that class at many dropdowns,

1 solution

use your javascript in same page only where your control is...
 
Share this answer
 
Comments
Arun kumar Gauttam 11-Dec-12 3:29am    
i also try this, but not work

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900