Working on a Rails app view, I am attempting to use JavaScript to determine the screen size and display different content based on that information.
This is what I currently have:
<script>
if( $(window).width() < 1000){
'<%= @resize = true %>';
} else {
'<%= @resize = false %>';
}
</script>
Even when the browser window size is less than 1000, I consistently receive 'false' for the @resize variable. How can I resolve this issue?