I'm trying to use a script to make an image fade if the size of the resized window is less than 400px wide, but it's not working ...
Script:
<script type="text/javascript">
$(function(){
if($(window).width() < 400) {
$('#facebook, #youtube').hide();
} else {
$('#facebook, #youtube').show();
}
});
</script>
When I use an alert on the console, it returns 980px even if I resize the window ...