Performance-wise, which would be the better solution? Here\'s a really small example. The PHP script returns a number to jQuery, which needs to be checked if it\'s 1>
That would be dependent on your server hardware, but I guess for the overall performance of your site it's better to do such "decorations" on the client side.
edit:
Plus you have less data to submit to the client.