About the reusable html controls together with javascript code
Currently I am working on a page with 2 groups of HTML controls almost same. I am wondering is there anyway that I can reuse it rather than duplicate both HTML and JavaScript code.
I was trying to put it on a partial view but later on I found the JavaScript code can't be 开发者_如何学Creused since the IDs are actually referring to the first group of HTML controls.
How to solve this in general? Thanks!
Implemented it as a jQuery plug-in is a good idea.
精彩评论