Revision #5 has been created by qiang on Oct 24, 2010, 8:08:49 PM with the memo:
typo fix.
« previous (#4) next (#6) »
Changes
Title
unchanged
CSS Naming Conventions
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
CSS, naming conventions
Content
changed
[...]
<?php endforeach ?>
<?php endif ?>
</head>
~~~
Note that in the above, we assume the CSS files are listed in the `css.files` application parameter
s. 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 modify
ing 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(){
...[...]