我已经创建了一些代码来隐藏我的菜单,菜单不完整,但我正在尝试使用jQuery.slideUp()函数,但它添加style="overflow: hidden;"到代码中,所以当我使用.show我的一个元素被隐藏,这是#nav:after,#nav:before并添加了一个小箭头到菜单的底部
这是js代码
$("span#start_button").click(function () {
if ($("#nav").is(":hidden")) {
$("#nav").show("fast");
} else {
$("#nav").slideUp();
}
});
Run Code Online (Sandbox Code Playgroud)
这是该网站的结果
我怎么能停止.slideUp()创作style="overflow: hidden;"?
我将代码从java转换为C++有一个小问题
我试图检查是否设置了2d数组,这是我的java代码
for(int area_y = y -1 ;area_y > 0 ;area_y--)
{
for(int area_x = 0 ;area_x < x; area_x++)
{
if(area[area_x][area_y] == 0)
{
System.out.print(" "); // this is printed
// if area[area_x][area_y] is not set
}
else
System.out.print(area[area_x][area_y]);
}
System.out.println();
}
Run Code Online (Sandbox Code Playgroud)
这是我的c ++代码,这是有效的
for(int area_y = y -1 ;area_y > 0 ;area_y--)
{
for(int area_x = 0 ;area_x < x; area_x++)
{
if(area[area_x][area_y] == 0) // this line does not work as
// the next line is not …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用indexOf(""); 在这个字符串上
"This i$ an aardvaAr yeEeeAs onDo qwerty XYZ9";
这是我的代码
space = word.indexOf(" ");
tempWord = word.substring(0, space);
Run Code Online (Sandbox Code Playgroud)
现在我得到了我想要的This字符串,但是现在我如何得到它之后i$的下一个空格:和下一个单元格结束字符串?
*编辑
请不要这个问题的数组