Calling different JQuery function with same CSS class name
I am using html.ActionLink helper to create my HTML in MVC 2.0 application. There are many ActionLink开发者_高级运维 button like for example: Cancel, Submit and refresh on the same page. All these three buttons use the same CSS Class Name. I have to call different JQuery functions (to perform differnet kind of validations) when each of these buttons are clicked. I dont have control over the CSS class. What would be the best way to acheive the result?
$(document).ready(function() {
$('button').click(function() {
$('.vanish').fadeout('slow');
});
});
$('.vanish') is calling the css class .vanish try using something like this hopefully it helps
精彩评论