PDA

View Full Version : How to use jquery generate css tree arr ?



linjuming
16 Apr 2011, 09:09 PM
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
function get_css_tree(){
/* How to use jquery generate css tree arr ?
arr=[
"div.line_cont_1",
"div.line_cont_1 h2.head_title",
"div.line_cont_1 h2.head_title a",
"div.line_cont_1 div.mod",
"div.line_cont_1 div.mod ul.news_list",
"div.line_cont_1 div.mod ul.news_list li",
"div.line_cont_1 p",
"div.line_cont_1 div.bottom",
"div.line_cont_1 div.bottom div"
];
*/
}
</script>

<!-- contents -->
<div class="line_cont_1">
<h2 class="head_title"><a href="#">Lorem</a></h2>
<div class="mod">
<ul class="news_list">
<li class="current">Lorem ipsum</li>
<li>Lorem ipsum</li>
<li>Lorem ipsum</li>
</ul>
<p>good morning sir</p>
</div>
<div class="bottom">
<div>what are you?</div>
</div>
</div>