Ash Ash - 4 months ago 8
CSS Question

change php echo font and color

Is there a way to enlarge and change the color text in the echoed data in this function?

<?php
echo '<script type="text/javascript" src="jquery.js"></script>';
echo '<script type="text/javascript">';
echo "$(document).ready(function() {
setInterval(function () {
$('#show').load('somepage.php')
}, 3000);
});";
echo '</script>'
?>

Answer
<?php
echo '<script type="text/javascript" src="jquery.js"></script>';
echo '<script type="text/javascript">';
echo    "$(document).ready(function() {
        setInterval(function () {
            $('#show').load('somepage.php').css({
                'font-size': '18px',
                'color: '#F00'
            });
        }, 3000);
    });";
echo '</script>'
?>

Or, the best way, CSS:

#show {
    font-size: 18px;
    color: #F00;
}