Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/467.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 干扰<;按钮>;标签_Javascript_Button_Search_Calendar_Blogs - Fatal编程技术网

Javascript 干扰<;按钮>;标签

Javascript 干扰<;按钮>;标签,javascript,button,search,calendar,blogs,Javascript,Button,Search,Calendar,Blogs,我的搜索和日历按钮似乎有问题。他们使用的功能与我的博客存档按钮相同 <script> $('button').each(function() { /* "each" in jQuery lets us apply what's inside here to each button individually without having to give them each their own names. Imagine this code going d

我的搜索和日历按钮似乎有问题。他们使用的功能与我的博客存档按钮相同

    <script>
    $('button').each(function() {

      /* "each" in jQuery lets us apply what's inside here to each button individually without having to give them each their own names. Imagine this code going down the line and repeating everything below for each of the buttons. */

      var $thisButton = $(this);

      /* To refer to the individual button inside of this section we can use $(this), but to try and make the rest of this more clear, I'm going to rename $(this) to $thisButton */

      $thisButton.click(function() {

        var $thisButtonsDropdown = $thisButton.siblings();

        /* Sibling here means "on the same level as the button." We need to do this to find the section of months or links that matches this button we clicked, so that we slide up/down the right one--the one we want is the one that is next to it, its sibling. */

        /* This part should be a little familiar! */
        if ($thisButtonsDropdown.is(':visible')) {
          $thisButtonsDropdown.slideUp();
          $thisButton.removeClass('flip');
        } else {
          $thisButtonsDropdown.slideDown();
          $thisButton.addClass('flip');
        }
      });
    });
    </script>

⟢
⟣

我的猜测是因为他们使用相同的标签,尽管我不确定。有人知道会发生什么事吗?有人知道会发生什么事吗

请问,有人能帮忙吗?是的,我猜是不想帮你,因为你没有把你的代码有什么问题,你的预期结果是什么。所以更新帖子,几秒钟内就会帮到你。@Mortimer嘿。事实上我已经把它都修好了。结果是我不得不把搜索框的所有代码移到标签前面。现在,由于某些原因,我的日历上的按钮不起作用了。请,有人能帮忙吗?是的,我想我不想帮你,因为你没有把你的代码有什么问题,你的预期结果是什么。所以更新帖子,几秒钟内就会帮到你。@Mortimer嘿。事实上我已经把它都修好了。结果是我不得不把搜索框的所有代码移到标签前面。现在,由于某种原因,我的日历上的按钮不起作用了。
/* Start JS Calendar */

.calendar-wrapper {
  width:175px;
  height:175px;
  margin:3em auto;
  margin-left:20px;
  padding:2em;
  border:0px solid @calendar-border;
  border-radius:5px;
  background:none;
  position:absolute;
    top:0px;
    left:20px;
    z-index:100;
  cursor:text;

}
table {
  clear:both;
  width:208px;
  height:100px;
  border:5px double #000;
  border-radius:0px;
  border-collapse:collapse;
  color:@calendar-color;
  background:white;
  position:absolute;
    top:0px;
    left:0px;
  cursor:text;
}
td {
  font-family:Overpass, Arial, Verdana, Trebuchet MS, Segoe UI, Lucida Sans;
  height:8px;
  text-align:center;
  vertical-align:middle;
  border-right:1px solid black;
  border-top:1px solid black;
  width:100% / 7;
  cursor:text;
}
td.not-current {
  color:#ccc;
  font-family:Overpass, Arial, Verdana, Trebuchet MS, Segoe UI, Lucida Sans;
  cursor:text;
  font-size:17px;
}
td.normal {}
td.today {
  font-weight:bold;
  color:#98d6e3;
  font-family:Overpass, Arial, Verdana, Trebuchet MS, Segoe UI, Lucida Sans;
  text-shadow:none;
  cursor:text;
}

thead td {
  border:none;
  color:#6871b8;
  text-transform:capitalize;
  text-shadow:0px 2px 1px #aaa;
  font-size:1.2em;
  font-family:Overpass, Arial, Verdana, Trebuchet MS, Segoe UI, Lucida Sans;
  background:rgba(255, 255, 255, 1);
  padding-left:6px;
  padding-right:6px;
  padding-top:3px;
  width:275px;
  cursor:text;
  z-index:0px;
}

#btnPrev {
  background:none;
  border:none;
  color:rgba(153, 159, 207, 1);
  font-family:Laila, Segoe UI Light, Arial, Segoe UI, Georgia, Verdana;
  font-weight:normal;
  font-size:1em;
  float:left;
  margin-bottom:20px;
  position:absolute;
  top:10px;
  left:29px;
  z-index:250;
}
#btnNext {
  background:none;
  border:none;
  color:rgba(153, 159, 207, 1);
  font-family:Laila, Segoe UI Light, Arial, Segoe UI, Georgia, Verdana;
  font-weight:normal;
  font-size:1em;
  float:right;
  margin-bottom:20px;
  position:absolute;
  top:10px;
  left:227px;
  z-index:250;
}
#btnPrev:hover {
  border:none;
  outline:none;
  font-size:1em;
  cursor:pointer;
  font-family:Laila, Segoe UI Light, Arial, Segoe UI, Georgia, Verdana;
  text-shadow:0px 0px 2px #fff, 0px 0px 2px #fff;
  text-transform:none;
  transition:all 0.3s ease;
  color:white;
  z-index:100;

}

#btnNext:hover {
  border:none;
  outline:none;
  font-size:1em;
  cursor:pointer;
  font-family:Laila, Arial, Segoe UI, Georgia, Verdana;
  text-shadow:0px 0px 2px #fff, 0px 0px 2px #fff;
  text-transform:none;
  transition:all 0.3s ease;
  color:white;
  z-index:100;
}


.days {
  color:#7b6f7d;
  background:#fff;
  cursor:text;
  font-family:Overpass, Arial, Verdana, Trebuchet MS, Segoe UI, Lucida Sans;
}

/* End JS Calendar */ 
<div class="calendar-wrapper">
  <button id="btnPrev" type="button">&#10210;</button>
      <button id="btnNext" type="button">&#10211;</button>
  <div id="divCal"></div>
</div>