当前的Slim.html:
#fullpage
=render partial: 'section_one'
=render partial: 'section_two'
=render partial: 'section_three'
=render partial: 'section_four'
=render partial: 'section_five'
我遇到的问题是,如果在移动端查看,我不想呈现partial: 'section_four'。
我尝试了这个:
#fullpage
=render partial: 'section_one'
=render partial: 'section_two'
=render partial: 'section_three'
- if $(window).width() >= 700
=render partial: 'section_four'
=render partial: 'section_five'
但它不起作用。有什么想法吗?