相关疑难解决方法(0)

jQuery从$(这个)不起作用得到最接近的兄弟元素

我想隐藏最接近点击按钮的跨度,并隐藏按钮.

html就是这样的

<!-- the div will be looped using php -->
<!-- this will only be a general idea of the code as the actual is very long and messy -->
<div>       
  <form><!-- This is like the head section -->
    <div>
        <div> <!-- some divs -->
            <button class="btn"></button> <!-- where i want it to work -->
                <div></div><!-- make this 5 times -->
            <span>content to hide</span>
        </div>
    </div>
  </form>      
  <div><!-- Comments to the head are here -->
    <button class="btn"></button><!-- button where …
Run Code Online (Sandbox Code Playgroud)

javascript jquery

0
推荐指数
1
解决办法
1391
查看次数

标签 统计

javascript ×1

jquery ×1