使用jQuery将类添加到特定div之后的第一个部分
HTML:使用jQuery将类添加到特定div之后的第一个部分,jquery,Jquery,HTML: 一些花哨的代码。 一些别致的款式。 如何将带有jquery的类添加到标题后的第一部分? $('header~ section:first')。addClass('test') .test{ 颜色:绿色; } 一些花哨的代码。 一些别致的款式。 部分 部分 部分 $('header~ section:first')。addClass('test') .test{ 颜色:绿色; } 一些花哨的代码。 一些别致的款式。 部分 部分 部分 $('header~ section:f
一些花哨的代码。
一些别致的款式。
如何将带有jquery的类添加到标题后的第一部分?
$('header~ section:first')。addClass('test')代码>
.test{
颜色:绿色;
}
一些花哨的代码。
一些别致的款式。
部分
部分
部分
$('header~ section:first')。addClass('test')代码>
.test{
颜色:绿色;
}
一些花哨的代码。
一些别致的款式。
部分
部分
部分
$('header~ section:first')。addClass('test')代码>
.test{
颜色:绿色;
}
一些花哨的代码。
一些别致的款式。
部分
部分
部分
$('header~ section:first')。addClass('test')代码>
.test{
颜色:绿色;
}
一些花哨的代码。
一些别致的款式。
部分
部分
部分
使用以下方法:
<header id="header" class="">
<div class="header-top-row">
Some fancy code.
</div>
</header>
<style>
Some fancy styles.
</style>
<section>
</section>
<section>
</section>
<section>
</section>
使用以下命令:
<header id="header" class="">
<div class="header-top-row">
Some fancy code.
</div>
</header>
<style>
Some fancy styles.
</style>
<section>
</section>
<section>
</section>
<section>
</section>
使用以下命令:
<header id="header" class="">
<div class="header-top-row">
Some fancy code.
</div>
</header>
<style>
Some fancy styles.
</style>
<section>
</section>
<section>
</section>
<section>
</section>
使用以下命令:
<header id="header" class="">
<div class="header-top-row">
Some fancy code.
</div>
</header>
<style>
Some fancy styles.
</style>
<section>
</section>
<section>
</section>
<section>
</section>
请尝试下面的代码
预编演示
$('document').ready(函数(){
$(“正文部分”).first().addClass('test');
})
尝试下面的代码
预编演示
$('document').ready(函数(){
$(“正文部分”).first().addClass('test');
})
尝试下面的代码
预编演示
$('document').ready(函数(){
$(“正文部分”).first().addClass('test');
})
尝试下面的代码
预编演示
$('document').ready(函数(){
$(“正文部分”).first().addClass('test');
})
$('header')。兄弟姐妹('section:first')
..。$('header')。兄弟姐妹('section:first')
..。$('header')。兄弟姐妹('section:first')
。。。。。??