views:

29

answers:

1

Does .css( propertyName ) not breaking the rule of separation of concerns?

As a rule of separation of concern , we keep content, style and behaviour in different layer. but when we add styles using behaviour (http://api.jquery.com/css/), does it not breaking the rules of concern.

+1  A: 

no, because's behavior's job is to affect the style and content.

what may be a better idea, that helps keep the seperation, is to add and remove classes with jQuery, and leave the style rules in the CSS files.

GSto