I think you meant either one of those values, in that case var arr = ['bat', 'ball']; var selectors = arr.map(function(val) { return ':contains(' + val + ')' }); var $lis = $('ul li').filter(selectors.join()); $lis.css('color', 'red')
cricket bat
tennis ball
golf ball
... Make sure this line: $('#remarks').parsley( 'addConstraint', { minlength: 5 }); is called before you check isValid().... First you need to get your timestamps in to Date() objects, which is simple using the constructor. I'm a user-friendlier drop-in replacement for the standard