asp.net mvc - How can I keep all JQuery in the external script file? -
I have some submissions buttons with the same ID in multiple views / pages. Currently I use all my jQuery code in html view I keep in How can I add all these JQuery to a JS file? My concern is that I have click functions on the buttons given below in many pages and they do different things
I think they do not know some disputes on which J button Click if I'll put in a JS file. How can I achieve that? I do not like to have a view / page for a JS file. Thank you.
$ ('# btn submit'). Click (function () {// do something}};
How much is your program Depending on the large, it may be useful to split your code, depending on the page, if you have a registration.php page, depending on the page, you can join a registration.js file that you can join It helps along with debugging, then you do not need to load a JS file every time in which 5,000 Links can be included in the code, when in fact you only need to use a small function.
Comments
Post a Comment