我正在尝试在页面加载时调用我的类,以及重新加载结果X秒,但是在setTimeout教程之后,jquery似乎折腾了一个错误,我不明白它是无语法.
未捕获RangeError:超出最大调用堆栈大小
var rand = function() {
return Math.random().toString(36).substr(2);
};
lhc();
function lhc(){
$('#lhcb a').each(function() {
var rawlink = $(this).attr("href");
var link = encodeURIComponent( rawlink );
var token = rand();
var href = $(this).prop('href');
var proceed = $.getJSON( "lhc/link.php?link=" + link + "&a=c", function( data ) {
if ( data.proceed == 'true' ) {
return true;
} else {
return false;
}
}).error(function(e) { alert("error"); console.log(e);});
if ( href.match("^javascript:") ) {
proceed = false;
}
if ( rawlink.charAt(0) != '#' …Run Code Online (Sandbox Code Playgroud) 我到处都看到这个帖子,没有真正的帮助,或者它被无缘无故地关闭,除了版主觉得它在未来“没有帮助”,尽管谷歌得出了一个很好的结果,总结了大约 55,000 多个相关结果。
那么,为什么 padding-right 不能与父级一起使用,而文本对齐右子级呢?
.rightcbar {
display: block;
font-family: 'Roboto', sans-serif;
text-shadow: 0px 0px 20px #dbd69d;
padding-right: 50px;
height: 152px;
width: 592px;
line-height: 152px;
background: url(rightcbar.png) no-repeat;
}
.rightcbar .rightctext {
display: inline-block;
width: 100%;
text-align: right;
font-size: 25px;
color: #f3f1de;
font-size: 25px;
font-family: 'Roboto', sans-serif;
text-shadow: 0px 0px 10px #aaa;
-webkit-font-smoothing: subpixel-antialiased;
}
Run Code Online (Sandbox Code Playgroud)
超文本标记语言
<div id="rightc">
<div class="rightcbar">
<div class="rightctext">Test</div>
</div>
<div class="rightcbar">
<div class="rightctext">Test</div>
</div>
<div class="rightcbar">
<div class="rightctext">Test</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
Smeegs 帮助准确解释了为什么事情没有按照我下面的意图进行;如果你感兴趣。这是修改后的工作代码。
.rightcbar {
display: …Run Code Online (Sandbox Code Playgroud) 有没有办法在span没有超时或间隔功能的情况下逐个动画我的标签?我可以轻松地使用键和ID来做到这一点,但它似乎不是最好的方式.这是我在小提琴例子中所拥有的
没关系原始问题,从我收集到的你需要使用的delay()功能.我唯一的问题是,如何在不使用初始动画的延迟的情况下立即启动此动画?更新了以下代码和小提琴.
var credits = $('#credits'),
container = credits.parent(),
conPos = container.position(),
creditsText = credits.find('span'),
first = 0;
delay = 1000,
count = creditsText.length;
container.fadeIn('slow', function() {
creditsText.each(function() {
$(this).css({
'top': ( conPos.top - $(this).height() ),
'left': ( ( ( conPos.left + container.width() ) - $(this).width() ) / 2 )
}).delay(delay)
.animate({
'top': ( ( ( conPos.top + container.height() ) - $(this).height() ) / 2 ),
'opacity': '1.0'
},
{
duration: 4000,
complete: …Run Code Online (Sandbox Code Playgroud) 我有一个很好用的脚本......但是如果网上没有人,我希望它不会做任何事情.我查看了有关如何检查str是否不在变量中的所有文档,但它总是会出现相同的错误,我认为这可能是其他错误,但除了在底部添加fi之外,其他任何事情都没有触及用于检查是否没有在线用户的新if语句...
错误: startAnnouncement.sh: 44: [[: not found
#!/bin/bash
checkServer=$(/etc/init.d/minecraft status)
checkUsers=$(/etc/init.d/minecraft command list)
cd /.smc
# Is the server even running?
if [[ $checkServer =~ "is running" ]]; then
#Is anyone online to even see the message...?
if [[ ! $checkUsers =~ "are 0 out" ]]; then
# No count file? Create it.
if [ ! -f /.smc/lastAnnouncement.txt ]; then
echo 0 > /.smc/lastAnnouncement.txt
fi
# Load count
lastAnn=$(cat /.smc/lastAnnouncement.txt)
# ANNOUNCEMENTS
announcement[0]='Dont forget to check out http://fb.com/pyrexiacraftfans for news …Run Code Online (Sandbox Code Playgroud) jquery ×2
bash ×1
css ×1
delay ×1
each ×1
function ×1
html ×1
javascript ×1
padding ×1
settimeout ×1
text-align ×1