Skip to content

Instantly share code, notes, and snippets.

@mretzak
Created December 31, 2013 16:35
Show Gist options
  • Save mretzak/8199244 to your computer and use it in GitHub Desktop.
Save mretzak/8199244 to your computer and use it in GitHub Desktop.
Clear search class toggle on container
$scope.toggleClearSearch = function() {
if ($scope.filters.search == '') {
$('#search-form').removeClass('filtered');
}
else {
$('#search-form').addClass('filtered');
}
}
$scope.search = function() {
$scope.filters.search = $scope.patientSearch;
$scope.toggleClearSearch();
};
$scope.clearSearch = function() {
$scope.filters.search = '';
$scope.patientSearch = '';
$scope.toggleClearSearch();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment