Difference between #4 and #5 of
CSS Naming Conventions

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 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(){
...
[...]
35 0
23 followers
Viewed: 33 599 times
Version: 1.1
Category: Tutorials
Written by: qiang
Last updated by: Gismo
Created on: Oct 22, 2010
Last updated: 5 years ago
Update Article

Revisions

View all history