ASP.Net checkbox missing CSS class

前端 未结 5 1583
走了就别回头了
走了就别回头了 2020-12-17 15:03

I have the following ASP.Net check box control added to a page:

Bu

5条回答
  •  醉梦人生
    2020-12-17 15:47

    This post is quite old, but I'll post my solution to help anyone coming from google (like me).

    You can use the child selector > in jQuery, because the wrapping span has the CssClass that you specified, and one input child. In your code:

    $('.myClass > input').addClass("myClass");
    

提交回复
热议问题