开发者

Calling different JQuery function with same CSS class name

开发者 https://www.devze.com 2023-01-24 16:57 出处:网络
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 thr

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

0

精彩评论

暂无评论...
验证码 换一张
取 消