Содержимое examples.js
(function ($)
{
$.fn.ignite = function (burn)
{
$(this).each(
function ()
{
var letters = $(this).text().split(\'\');
$(this).html(\'<span>\' + letters.join(\'</span><span>\') + \'</span>\');
$spans = $(this).find(\'span\');
setInterval(function () {$spans.each(burn);}, 100);
}
);
}
})(jQuery);
function gasFlame()
{
var colors = [\'#fff\', \'#99f\', \'#00f\', \'#009\'];
if (Math.random() > 0.90)
{
colors.push(\'#f90\');
}
var hv = 0.04;
var textShadows = [];
var c = 0;
var h = 0;
var s = 0;
while (c < colors.length)
{
s = 2 + Math.round(Math.random() * 2);
while (s--)
{
shadow = \'0 \' + h + \'em \' + -h + \'em \' + colors[c];
textShadows.push(shadow);
h -= hv;
}
c++;
}
$(this).css({color: colors[0], textShadow: textShadows.join(\', \')});
}
$(
function ()
{
$(\'p.flaming\').ignite(gasFlame);
}
);
HTML
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
<meta http-equiv=\"Content-Language\" content=\"en-us\" />
<title> </title>
<script type=\"text/javascript\" src=\"http://www.zachstronaut.com/js.164/jquery.js\"></script>
<script type=\"text/javascript\" src=\"http://www.zachstronaut.com/posts/text-effects/examples.js\"></script>
</head>
<body>
<p class=\"flaming\">Текст</p>
<p class=\"flaming\">Текст2</p>
</body>
</html>
Как сделать что бы обрабатывались оба параграфа?
Спасибо