I am trying to hide my div that has id=\"crossfade\" where there is an ng-click event.
1) Is this possible? 2) What am I doing wrong?
It's a little hard to figure out exactly what is wrong without seeing the getData function but from what I can see, heres some suggestions
Firstly, never bind to a function, its hard to debug and its costly performance wise.
Here is a solution that will work. I'd suggest either hard coding properties for each item or use an array. I've used a single property here for simplicity.
HTML
...
JS
swimwearVisible = false;
showSwimwear(){
this.swimwearVisible = !this.swimwearVisible;
}
All being well the div will show and hide when you click the link. It'll also show the current state to help you debug.