I have a gridview that puts a drop down list in every cell of a certain column.
I want all the dropdownlists to implement a Jquery select class. The normal way to do this is as follows
<script type="text/javascript">
$(function () {
$("#language").selectbox();
});
</script>
Now the problem is there will be multiple with different ID’s so I cant set it this way.. Is there any way to set all drop down lists as per their cssclass or a way to do it inline? (ie i can add attributes to the dropdownlist through C#)
To select multiple elements by their ids just specify them as a comma separated list as a selector
If all the elements you want to select has a class use a dot
.before the class in the selectorhttp://api.jquery.com/category/selectors/