Created
June 29, 2018 09:31
-
-
Save flxxyz/174d564569aae04765decee05dfbff78 to your computer and use it in GitHub Desktop.
点击网页随机出现预设的文字
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).click(function() { | |
var a = ['富强', '民煮', '自由', '平等', '友爱', '河蟹', '神马', '香甜']; | |
var v = a[Math.floor(Math.random() * a.length)]; | |
var tips = $('<div style="position:fixed;z-index:9999;color:red;top:200px;left:600px"></div>').text(v).animate({top:'160px'}, 750, function() {$(this).remove()}); | |
$('body').append(tips); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment