CSS Naming Conventions

Comparing #4 with #5

Revision #5 was created by qiang qiang on Oct 24, 2010, 8:08:49 PM.

typo fix.

Content

[...]
<?php endforeach ?>
<?php endif ?>
</head>
~~~

Note that in the above, we assume the CSS files are listed in
the `css.files` application parameters. And if the files are combined and compressed, the resulting file name should be put in the `css.files.compressed` application parameter (t. The console command should do this job by modifying the application configuration file .) ## Conventions for Naming jQuery Selectors We can use the above CSS naming conventions in jQuery selectors in the application's javascript code. In particular, when selecting one or several elements using jQuery selectors, we should follow the similar rule for declaring CSS styles. For example, if we want to attach `click` handlers to all hyperlinks within news item blocks, we should use the following jQuery selectors:

~~~
[javascript]
$('.news-index .item a').click(function(){
...
[...]