I want to change my header.php file for mobile devices. I've tried this javascript solution but it doesn't write the php file. How can I fix this?
<script language=javascript>
if (screen.width >= 720 )
$('#header').load('header.php');
else (
$('#header').load('header-mobile.php');
)
</script>
<div id="header"></div>
Thanks