Tag Archives: JQuery

setting SharePoint buttons to ignore jquery validation

I’m using JQuery with SharePoint. When using the Validation plug-in I had some trouble with the buttons on the Tool Part causing validation errors and preventing me from saving changes to the web part configuration. Thankfully, each of the buttons had the class “UserButton” assigned. So this bit of code fixed the problem.

$(".UserButton").addClass("cancel");

The validation plug-in will now ignore the click events on these buttons because they’ve been tagged as “cancel”.