Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/407.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.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 使用jQuery在悬停和从左向右滑动时在Span中插入文本 吃饼干很有趣 var quotes=new数组('do what and','live life and','get funky and','do your thing and'); $('.site description').mouseover(函数(){ $('.description addition').text(引号[Math.floor(Math.random()*quotes.length)]; }).mouseout(函数(){ $('.description addition')。文本(“”); });_Javascript_Jquery_Html - Fatal编程技术网

Javascript 使用jQuery在悬停和从左向右滑动时在Span中插入文本 吃饼干很有趣 var quotes=new数组('do what and','live life and','get funky and','do your thing and'); $('.site description').mouseover(函数(){ $('.description addition').text(引号[Math.floor(Math.random()*quotes.length)]; }).mouseout(函数(){ $('.description addition')。文本(“”); });

Javascript 使用jQuery在悬停和从左向右滑动时在Span中插入文本 吃饼干很有趣 var quotes=new数组('do what and','live life and','get funky and','do your thing and'); $('.site description').mouseover(函数(){ $('.description addition').text(引号[Math.floor(Math.random()*quotes.length)]; }).mouseout(函数(){ $('.description addition')。文本(“”); });,javascript,jquery,html,Javascript,Jquery,Html,希望这就是你想要的 哎呀!从左向右滑出。相应地编辑。fadeIn(“慢”);淡出(“慢”);这似乎可以很好地使用,而且您在对齐方面没有任何问题。 <p class="site-description">Its fun to <span class="description-addition"></span>eat cookies</p> <script> var quotes = new Array('do whatever

希望这就是你想要的

哎呀!从左向右滑出。相应地编辑。fadeIn(“慢”);淡出(“慢”);这似乎可以很好地使用,而且您在对齐方面没有任何问题。
<p class="site-description">Its fun to <span class="description-addition"></span>eat cookies</p>

<script>
    var quotes = new Array('do whatever and ', 'live life and ', 'get funky and ', 'do your thing and ');
    $('.site-description').mouseover(function() {
        $('.description-addition').text(quotes[Math.floor ( Math.random() * quotes.length )]);
    }).mouseout(function() {
        $('.description-addition').text("");
    });
</script
<p class="site-description">Its fun to <span class="description-addition" style="display:none;"></span> eat cookies</p>
$(document).ready(function() {
    var quotes = new Array('do whatever and ', 'live life and ', 'get funky and ', 'do your thing and ');

    $('.site-description').mouseover(function() {
        $('.description-addition').text(quotes[Math.floor ( Math.random() * quotes.length )]+' ').toggle("slow");
    }).mouseout(function() {
        $('.description-addition').toggle("fast");
    });
});