Click the page appears prosperous, democratic

Man of few words said, directly on the code

<Script the src = 'HTTP: //mat1.gtimg.com/libs/jquery/1.12.0/jquery.js'> </ Script> 
<Script type = "text / JavaScript"> 
$ (Document) .ready ( function () {
     var a_index = 0 ; 
    $ ( "body") the Click (. function (E) {
         var A = new new Array ( "prosperity", "democracy" and "civilization" and "harmony", "freedom", "equality "," fair "," law "," patriotic "," dedicated "," integrity "and" friendliness " );
         var $ I $ = (" <span /> " ) .text (A [a_index]); 
        a_index = (+ a_index. 1)% a.length;
        var x = e.pageX,y = e.pageY;
        $i.css({
            "z-index": 99999,
            "top": y - 20,
            "left": x,
            "position": "absolute",
            "font-weight": "bold",
            "color": "#ff6651"
        });
        $("body").append($i);
        $i.animate({"top": y-180,"opacity": 0},1500,function() {
            $i.remove();
        });
    });
});
</script>

 

Guess you like

Origin www.cnblogs.com/zhizou/p/11361310.html