Skip to content

Instantly share code, notes, and snippets.

@andyf-7
andyf-7 / client side mail validation
Created May 3, 2015 10:31
jqeury Mail validation in client side
function ValidateEmail(email) {
var expr = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
return expr.test(email);
};
At the moment my jQuery code is producing some odd behavior.
Clicking on one button causes the filter to work fine, but you cannot click it off and display all of the posts as before.
Clicking on multiple buttons also works; sometimes clicking a button off will work, but this is not consistent,
sometimes it will need to be clicked multiple times before it works.
-----------------------------------------------------------------------------------------------------------------------
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script>